-
-
Save Gbury/d18e9b00a9c1c1a9b4bc227a655e1546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type 'payload head = | |
| Foo : int head | |
| Bar : float head | |
| App : t list head | |
and t = T : { | |
mutable head : 'payload head; | |
mutable payload : 'payload; | |
} -> t | |
let set_to_float (T t) = | |
(* this does not typecheck ofc... *) | |
t.head <- B; | |
t.payload <- 1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment