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

confusing error message for private row types without a row variable #6025

Closed
vicuna opened this issue May 30, 2013 · 3 comments
Closed

confusing error message for private row types without a row variable #6025

vicuna opened this issue May 30, 2013 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented May 30, 2013

Original bug ID: 6025
Reporter: @diml
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:26:33Z)
Resolution: fixed
Priority: low
Severity: text
Version: 4.01.0+dev
Target version: 4.01.1+dev
Fixed in version: 4.02.0+dev
Category: typing

Bug description

I think that now that OCaml has private type abbreviations this error message is a bit confusing:

type t = private [ `a ];;

Error: This fixed type has no row variable

Precising that private type abbreviations are not allowed for polymorphic variants and objects should be enough.

@vicuna
Copy link
Author

vicuna commented Jun 19, 2013

Comment author: @damiendoligez

Just a note in passing: it is a bad idea to use uncapitalized polymorphic variant constructors. See "polymorphic variant types" in section 6.4 and "tag-name" in section 6.3 of the reference manual.

@vicuna
Copy link
Author

vicuna commented Jun 22, 2013

Comment author: @garrigue

Actually, there is no good reason to refuse create private type abbreviations for fixed polymorphic variants and objects. However, allowing in would require checking a lot of code in the compiler.

@vicuna
Copy link
Author

vicuna commented Apr 4, 2014

Comment author: @garrigue

Since 4.02 private types without a syntactic row variable are handled as private type abbreviations, so the problem disappeared.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the typing label Mar 14, 2019
@vicuna vicuna added this to the 4.01.1 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
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