Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module type ID = sig
- type t
- val of_string : string -> t
- val to_string : t -> string
- end
- module StrId : ID =
- struct
- type t = string
- let of_string x = x
- let to_string x = x
- end
- module TypeId = StrId
- module ServiceId = StrId
- (*
- utop # TypeId.of_string "abc";;
- - : ServiceId.t = <abstr>
- *)
- module type ID = sig
- type t
- val of_string : string -> t
- val to_string : t -> string
- end
- module StrId : ID =
- struct
- type t = string
- let of_string x = x
- let to_string x = x
- end
- module TypeId : ID = StrId
- module ServiceId : ID = StrId
- (*
- utop # TypeId.of_string "abc";;
- - : TypeId.t = <abstr>
- *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement