Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type _ t =
- IntLit : int -> int list t
- | BoolLit : bool -> bool list t;;
- let eval = fun (type a) ~(u:a t) ->
- let result : a =
- match u with
- IntLit x -> [x]
- | BoolLit x -> [x] in
- List.map (fun x -> x, x) result
- File "gadt.ml", line 10, characters 27-33:
- Error: This expression has type a but an expression was expected of type
- 'a list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement