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 removes brackets around immediate functions inside a list. #4427

Closed
vicuna opened this issue Oct 21, 2007 · 1 comment
Closed

Camlp4 removes brackets around immediate functions inside a list. #4427

vicuna opened this issue Oct 21, 2007 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Oct 21, 2007

Original bug ID: 4427
Reporter: jm
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:26:05Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Fixed in version: 3.10+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

% cat test.ml4
let l : (unit -> int) list = [(fun _ -> 42); (fun _ -> 42)]
% camlp4of -printer o -impl test.ml4 > test.ml
% ocamlc -i test.ml
File "test.ml", line 1, characters 40-42:
Warning S: this expression should have type unit.
File "test.ml", line 1, characters 44-55:
This expression should not be a function, the expected type is
int
2% cat test.ml
let l : (unit -> int) list = [ fun _ -> 42; fun _ -> 42 ]
% ocamlc -i -impl test.ml4
val l : (unit -> int) list

@vicuna
Copy link
Author

vicuna commented Nov 27, 2007

Comment author: ertai

Thanks for the report. This is now fixed in the CVS (both in trunk and release310 branch).

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