Skip to content

Instantly share code, notes, and snippets.

@gsg
Created July 15, 2015 16:16
Show Gist options
  • Save gsg/6b002119e27e78effd23 to your computer and use it in GitHub Desktop.
Save gsg/6b002119e27e78effd23 to your computer and use it in GitHub Desktop.
(* Compiles *)
module rec One : sig
val a : int -> int
end = struct
let a x = x + (One.a x)
end
(* Compiles *)
module rec Two : sig
val a : int -> int
module B : sig end
end = struct
let a x = x + (Two.a x)
module B = struct end
end
(* Does not compile *)
module rec Three : sig
val a : int -> int
module B : functor (X : sig end) -> sig end
end = struct
let a x = x + (Three.a x)
module B (X : sig end) = struct end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment