You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3957 Reporter: alexbaretta Status: acknowledged (set by @damiendoligez on 2006-03-29T14:34:19Z) Resolution: open Priority: normal Severity: minor Category: documentation Related to:#3835
Bug description
root@alex:~# ledit ocaml
Objective Caml version 3.09.1+dev5 (2005-12-05)
type 'a foo = [ `Foo of 'a ];;
type 'a foo = [ `Foo of 'a ]
let x : [> 'x foo as 'x] option = None;;
Syntax error
#load "camlp4o.cma";;
Camlp4 Parsing version 3.09.1+dev5 (2005-12-05)
let x : [> 'x foo as 'x] option = None;;
val x : [> ('a foo as 'a) foo ] option = None
Additional information
The problem is hardly significant, as the camlp4 based parsers easily allow to overcome it.
The text was updated successfully, but these errors were encountered:
Looking at the 4.01 version of the documentation, it is indeed slightly incomplete because it is not "typexpr" that is allowed here, but a restricted subset. The solution is general: add parentheses to make the parser happy:
let x : [> ('x foo as 'x) ] option = None;;
val x : [> ('a foo as 'a) foo ] option = None
Note: there are other constructs with the same kind of problem. In the future, we may make the documentation more precise, but I don't see this as a high-priority task.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 3957
Reporter: alexbaretta
Status: acknowledged (set by @damiendoligez on 2006-03-29T14:34:19Z)
Resolution: open
Priority: normal
Severity: minor
Category: documentation
Related to: #3835
Bug description
root@alex:~# ledit ocaml
Objective Caml version 3.09.1+dev5 (2005-12-05)
type 'a foo = [ `Foo of 'a ];;
type 'a foo = [ `Foo of 'a ]
let x : [> 'x foo as 'x] option = None;;
Syntax error
#load "camlp4o.cma";;
let x : [> 'x foo as 'x] option = None;;
val x : [> ('a foo as 'a) foo ] option = None
Additional information
The problem is hardly significant, as the camlp4 based parsers easily allow to overcome it.
The text was updated successfully, but these errors were encountered: