Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module type Format = sig
- type fmt
- val to_int : fmt -> int
- end
- module type Maker = functor (F : Format) -> sig
- type t
- val unsafe_b : F.fmt -> string
- val unsafe_s : string -> F.fmt
- end
- module FirstFormat =
- struct
- type fmt = string
- let to_int n = 1
- end
- module SecondFormat =
- struct
- type fmt = string
- let to_int n = 2
- end
- module Make (F : Format) = struct
- type t = F.fmt
- let unsafe_b (b : F.fmt) = b
- let unsafe_s (s : string) = s
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement