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

Suggestion for built in constructors #3723

Closed
vicuna opened this issue Jul 15, 2005 · 1 comment
Closed

Suggestion for built in constructors #3723

vicuna opened this issue Jul 15, 2005 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Jul 15, 2005

Original bug ID: 3723
Reporter: administrator
Assigned to: @damiendoligez
Status: resolved (set by @mshinwell on 2016-12-07T17:50:50Z)
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Ethan Aubin
Version: 3.07+2 and 3.08.3
OS: solaris/linux
Submission from: c-24-60-21-144.hsd1.ma.comcast.net (24.60.21.144)

Hi, I discovered that true/false/()/[] are treated like built-in constant
constructors.
(I accidentally typed 'type u = ()' instead of 'type u = unit'.)

Ocaml allows me to use 3 of these constructors in new type:

type t = true
type f = false
type u = ()

but

type l = []

fails with a parse error. Do people actually reuse these constructors? Maybe
their use on the rhs of a type decl could be deprecated or removed in 3.09?
Cheers - ethan.aubin@pobox.com

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

The example now works (I think possibly due to #234)

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