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

keywords and polymorphic variants #2348

Closed
vicuna opened this issue Jan 8, 2000 · 1 comment
Closed

keywords and polymorphic variants #2348

vicuna opened this issue Jan 8, 2000 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jan 8, 2000

Original bug ID: 18
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Markus Mottl
Version: 2.99
OS: SunOS 5.6
Submission from: alford.dai.ed.ac.uk (129.215.25.74)

Hello,

I am not sure whether this is a feature wish or a bug report:

It seems that OCaml parses polymorphic variants in such a
way that it is not possible to use keywords as variant names.

E.g.:

type t = [ `true ]

will lead to a syntax error. This is possibly too strict.
The preceding ` should allow the scanner to know that a
variant name follows immediately.

The current implementation allows whitespace and even
comments (!) between the and the name of the variant. This "freedom" is rather confusing. I propose that the and the variant name should stay together.

Best regards,
Markus Mottl

@vicuna
Copy link
Author

vicuna commented Nov 6, 2002

Comment author: administrator

It is better to reserve keywords in all contexts.

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