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

Rejected [@@unboxed] on a GADT in a mutual definition with a polymorphic type constructor #7774

Closed
vicuna opened this issue Apr 14, 2018 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Apr 14, 2018

Original bug ID: 7774
Reporter: @rlepigre
Assigned to: @gasche
Status: resolved (set by @gasche on 2018-04-14T21:14:09Z)
Resolution: duplicate
Priority: normal
Severity: minor
Version: 4.05.0
Category: typing
Duplicate of: #7364

Bug description

The following mutual type definition is rejected.

##########
type 'a t = {name : string; data : 'a}
and any = Any : 'a t -> any [@@ocaml.unboxed]
##########

According to the manual, it should be accepted, and there does not seem to be any good reason to reject it. (Hopefully, an element of ['a t] can never be a [float].)

Steps to reproduce

Just run OCaml on a file containing the two lines.

Additional information

The problem is the same with the 4.07.0+trunk version.

@vicuna
Copy link
Author

vicuna commented Apr 14, 2018

Comment author: @gasche

This problem is known

#7364

and there is work underway to fix it

https://github.com/SimonColin/ocaml-unboxed-check-project

so I hope that 4.08 will have a solution.

@vicuna vicuna closed this as completed Apr 14, 2018
@vicuna
Copy link
Author

vicuna commented Apr 14, 2018

Comment author: @rlepigre

OK cool. I missed that one...

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

2 participants