Advertisement
Guest User

Untitled

a guest
Dec 10th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.21 KB | None | 0 0
  1. module M : sig
  2.   type 'a t
  3.   val is_int : 'a t -> ('a t, int) eq
  4. end = struct
  5.   type 'a t = int
  6.   let is_int (type a) (x: a t) = (Eq: (a t, int) eq)
  7. end
  8.  
  9. open M
  10. let foo x =
  11.   let Eq = is_int x in x + 1
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement