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

ocamlyacc and type clash between ml and mli #4871

Closed
vicuna opened this issue Sep 21, 2009 · 1 comment
Closed

ocamlyacc and type clash between ml and mli #4871

vicuna opened this issue Sep 21, 2009 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 21, 2009

Original bug ID: 4871
Reporter: fbesson
Status: resolved (set by @damiendoligez on 2012-07-11T12:20:32Z)
Resolution: suspended
Priority: normal
Severity: minor
Version: 3.11.0
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello,

Ocamlyacc handles type scopes differently in the mli and ml.

For instance, suppose I have a file A.ml which defines a type t and a module A.

In B.mly, in the header I "open A" and my start symbol has type A.t
If I write A.t, B.mli compiles but B.ml does not.
If I write t, B.mli does not compile but B.ml would.

Ok, it is probably bad practice to shadow module names.
Yet the current behaviour is a little inconsistent...

Best,

@vicuna
Copy link
Author

vicuna commented May 31, 2011

Comment author: @damiendoligez

This will probably never be fixed. The official suggestion is that people should use menhir instead of ocamlyacc.

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