Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type (_, _, _) desc =
- | L : ('a, _, 'a) desc
- | R : (_, 'b, 'b) desc
- type (_, _, _) t =
- Tee : ('a, 'b, 'e) desc * ('e -> 't) -> ('a, 'b, 't) t
- let id x = x
- (* this works as expected *)
- let test_1 : type a b c . (a, b, c) desc -> (a, b, c) t =
- function
- | L -> Tee (L, id)
- | R -> Tee (R, id)
- (* this will cause type error *)
- let test_2 : 'a 'b 'c . ('a, 'b, 'c) desc -> ('a, 'b, 'c) t =
- function
- | L -> Tee (L, id)
- | R -> Tee (R, id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement