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

Type constraints in revised syntax #8432

Closed
vicuna opened this issue Jan 3, 2004 · 1 comment
Closed

Type constraints in revised syntax #8432

vicuna opened this issue Jan 3, 2004 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 3, 2004

Original bug ID: 2018
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Jim Farrand
Version: 3.07+2
OS: Gentoo GNU/Linux
Submission from: 81-178-234-70.dsl.pipex.com (81.178.234.70)

A type which is valid in the old syntax, but when converted to the revised
syntax with camlp4 is not accepted by the compiler.

Put the following type in the file bad_o.mli:

val foo : (< bar : unit; .. > as 'a) -> 'a

This can be compiled trivially by ocamlc. Convert to the revised syntax with
the following command:

camlp4o pr_r.cmo bad_o.mli >bad_r.mli

We get the following type in the revised syntax:

value foo : (< bar : unit; .. > as 'a) -> 'a;

However, this type is not accepted by the compiler:

ocamlc -pp camlp4r bad_r.mli
File "bad_r.mli", line 2, characters 27-29:
Parse error: [field] expected after ';' (in [type])
Preprocessor error

I'm not sure if this is a bug in the printer (pr_r.cmo) or the parser
(pa_r.cmo).

@vicuna
Copy link
Author

vicuna commented May 13, 2004

Comment author: administrator

Assigned to MM
Fixed by MM on 2004-05-12

@vicuna vicuna closed this as completed May 13, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant