Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Haskell version
- newtype Id1 = Id1 {unId1 :: Int}
- newtype Id2 = Id2 {unId2 :: Int}
- (* Ocaml version *)
- module Id1 : sig
- type t
- val of_int : int -> t
- val to_int : t -> int
- end = struct
- type t = int
- let of_int = ident
- let to_int = ident
- end
- module Id2 : sig
- type t
- val of_int : int -> t
- val to_int : t -> int
- end = struct
- type t = int
- let of_int = ident
- let to_int = ident
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement