Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* base.ml *)
- type t = int
- (* medium.ml *)
- type t = Base.t
- let _a : t = 42
- let b : t = 53
- (* medium.mli *)
- type t'
- val b : t'
- (* wrapper.mli *)
- type t
- module Medium : sig
- include module type of Medium with type t' := t
- end
- val print_int : t -> unit
- (* wrapper.ml *)
- type t = Base.t
- module Medium = struct
- include Medium
- end
- let print_int : t -> unit = fun n -> Format.printf "%d\n" n
- (* main.ml *)
- let () = Wrapper.(print_int Medium.b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement