Created
November 5, 2014 11:35
-
-
Save nomaddo/ea7e61ec058adbe9fcb0 to your computer and use it in GitHub Desktop.
escape
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
# 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