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

Signature mismatch with implicit functors + aliases #34

Open
yallop opened this issue Jun 5, 2015 · 1 comment
Open

Signature mismatch with implicit functors + aliases #34

yallop opened this issue Jun 5, 2015 · 1 comment

Comments

@yallop
Copy link
Contributor

yallop commented Jun 5, 2015

I'm not sure if this is supposed to be supported at the moment, but the current behaviour is rather surprising:

module type S = sig type t end
module type T = sig module M: S end

module N :
sig
  implicit functor F(X: T) = X.M
end =
struct
  implicit functor F(X: T) = X.M
end
Error: Signature mismatch:
       Modules do not match:
         sig implicit functor F (X : T) : sig type t = X.M.t end end
       is not included in
         sig implicit functor F (X : T) = X.M end
       In module F:
       Modules do not match:
         functor (X : T) -> sig type t = X.M.t end
       is not included in
         functor (X : T) -> (module X.M)
       At position module F(X) : <here>
       Modules do not match:
         sig type t = X.M.t end
       is not included in
         (module X.M)
@lpw25
Copy link
Member

lpw25 commented Jun 5, 2015

For now:

sig
  implicit functor F(X: T) = X.M
end

should be rejected by the parser.

Later we will add support for actual implicit functor aliases.

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

No branches or pull requests

2 participants