Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error with abstract module types and functors #6240

Closed
vicuna opened this issue Nov 17, 2013 · 1 comment
Closed

Strange error with abstract module types and functors #6240

vicuna opened this issue Nov 17, 2013 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Nov 17, 2013

Original bug ID: 6240
Reporter: @lpw25
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:25:19Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.01.1+dev
Category: typing

Bug description

The following type error appears to be a bug:

      OCaml version 4.01.0

module M : sig

  module type T
  module F (X : T) : sig end
end = struct
  module type T = sig end
  module F (X : T) = struct end
end;;
          module M : sig module type T module F : functor (X : T) -> sig  end end

module type T = M.T;;

module type T = M.T

module F : functor (X : T) -> sig end = M.F;;

Characters 40-43:
module F : functor (X : T) -> sig end = M.F;;
^^^
Error: Signature mismatch:
Modules do not match:
functor (X : M.T) -> sig end
is not included in
functor (X : T) -> sig end
At position functor (X : ) -> ...
Modules do not match: T is not included in M.T
At position functor (X : ) -> ...
Unbound module type M.T

@vicuna
Copy link
Author

vicuna commented Nov 18, 2013

Comment author: @garrigue

Fixed in trunk and 4.01, revision 14299 and 14300.

In subtyping, was not expanding the external module type in functor arguments at the right timing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants