Source file pair_intf.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
open! Base

module T = struct
  type 'a t =
    { lhs : 'a
    ; rhs : 'a
    }
  [@@deriving hardcaml]
end

module M (Data : Interface.S) = struct
  module type S = sig
    type nonrec 'a t = 'a Data.t T.t [@@deriving sexp_of]

    include Interface.S with type 'a t := 'a t
  end
end

module type Pair = sig
  module M = M

  type 'a t = 'a T.t =
    { lhs : 'a
    ; rhs : 'a
    }

  module Wrap (Data : Interface.S) : M(Data).S
end