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

camlp4 does not parse module constraints correctly #4242

Closed
vicuna opened this issue Mar 24, 2007 · 1 comment
Closed

camlp4 does not parse module constraints correctly #4242

vicuna opened this issue Mar 24, 2007 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Mar 24, 2007

Original bug ID: 4242
Reporter: xiemaisi
Assigned to: ertai
Status: closed (set by @xavierleroy on 2009-03-31T11:07:08Z)
Resolution: not a bug
Priority: normal
Severity: major
Version: 3.09.3
Fixed in version: 3.10.0
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

Camlp4 refuses to parse module constraints containing functor applications, i.e. constraints of the form "with module B = F(A)". According to the OCaml manual, such applications should be allowed (see section 6.10, production "mod-constraint").

The following (short but nonsensical) code compiles under pure ocamlc, but gives a "bad modules expr long ident" failure under camlp4 for the constraint in module type C:

======================================================================
module type A = sig end
module F (X:A) : A = struct end
module type B = sig module Y : A end
module type C =
(sig
module M1 : A
module M2 : B with module Y = F(M1)
end)

@vicuna
Copy link
Author

vicuna commented Mar 24, 2007

Comment author: ertai

Already fixed in CVS for 3.10

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

1 participant