package lascar

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file stringable.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(**********************************************************************)
(*                                                                    *)
(*                              LASCAr                                *)
(*                                                                    *)
(*  Copyright (c) 2017-present, Jocelyn SEROT.  All rights reserved.  *)
(*                                                                    *)
(*  This source code is licensed under the license found in the       *)
(*  LICENSE file in the root directory of this source tree.           *)
(*                                                                    *)
(**********************************************************************)

module type T = sig
  type t
  val to_string: t -> string
end

module Pair (M1: T) (M2: T) =
struct 
  type t = M1.t * M2.t 
  let to_string (e1,e2) = M1.to_string e1 ^ "," ^ M2.to_string e2
  let mk e1 e2 = e1,e2
end

module Triplet (M1: T) (M2: T) (M3: T) =
struct 
  type t = M1.t * M2.t * M3.t
  let to_string (e1,e2,e3) = M1.to_string e1 ^ "," ^ M2.to_string e2 ^ "," ^ M3.to_string e3
  let mk e1 e2 e3 = e1,e2,e3
end
OCaml

Innovation. Community. Security.