Skip to content

Instantly share code, notes, and snippets.

@stedolan
Created February 23, 2021 13:40
Show Gist options
  • Save stedolan/7c3141f5171dd34f59895a602337a453 to your computer and use it in GitHub Desktop.
Save stedolan/7c3141f5171dd34f59895a602337a453 to your computer and use it in GitHub Desktop.
# type t = Foo;;
type t = Foo
# type r = { foo : t };;
type r = { foo : t; }
# let x : r = { foo = Foo } ;;
val x : r = {foo = Foo}
# type s = t = private Foo;;
type s = t = private Foo
# let x : r = { foo = Foo } ;;
Error: Cannot create values of the private type s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment