Skip to content

Instantly share code, notes, and snippets.

@nomaddo
Created November 5, 2014 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nomaddo/ea7e61ec058adbe9fcb0 to your computer and use it in GitHub Desktop.
Save nomaddo/ea7e61ec058adbe9fcb0 to your computer and use it in GitHub Desktop.
escape
# module type S = sig type t val e : t end;;
module type S = sig type t val e : t end
# let f () = (module struct type t = int let e = 14 end : S);;
val f : unit -> (module S) = <fun>
# let module M = (val f () : S) in M.e;;
Characters 33-36:
let module M = (val f () : S) in M.e;;
^^^
Error: This expression has type M.t but an expression was expected of type
M.t
The type constructor M.t would escape its scope
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment