Skip to content

Instantly share code, notes, and snippets.

@Gbury
Last active August 29, 2019 11:58
Show Gist options
  • Save Gbury/8559c293fb7d63351e0319a1ea1c8fe9 to your computer and use it in GitHub Desktop.
Save Gbury/8559c293fb7d63351e0319a1ea1c8fe9 to your computer and use it in GitHub Desktop.
─( 13:56:23 )─< command 1 >──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # type foo = [`A | `B ];;
type foo = [ `A | `B ]
─( 13:56:27 )─< command 2 >──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # let f = function #foo -> 0;;
val f : [< foo ] -> int = <fun>
─( 13:56:32 )─< command 3 >──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # let f = function #foo -> 0 | `C -> 1;;
val f : [< `A | `B | `C ] -> int = <fun>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment