| Anonymous | Login | Signup for a new account | 2013-05-24 06:04 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005883 | OCaml | OCaml documentation | public | 2013-01-10 07:20 | 2013-01-17 04:12 | |||
| Reporter | norm | |||||||
| Assigned To | garrigue | |||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | |||
| Status | closed | Resolution | fixed | |||||
| Platform | Mac | OS | OS X | OS Version | 10.7.5 | |||
| Product Version | 4.00.1 | |||||||
| Target Version | Fixed in Version | 4.01.0+dev | ||||||
| Summary | 0005883: BNF insufficient for S (3, 4) | |||||||
| Description | The syntax does not seem to produce the expression “S (3, 4)” in the context of the declaration “type w = S of int * int”. The rule: expr ::= constr expr might suggest that expr could be a tuple, but then “let u = 4, 8 in S u” should be legal but ocaml 4.00.1 rejects it. | |||||||
| Additional Information | For prettier text and soap box see: http://cap-lore.com/Languages/ocaml/bugs/e.html [^] | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0008733) garrigue (manager) 2013-01-10 08:16 |
Indeed, constructors have an arity, and you cannot apply them to tuples. This is not a new behavior: this has been this way since caml-light, more than 20 years ago. But you are right that the manual is not very explicit about that. By the way, I think that the problem is not the production itself (which is about the parse, which indeed accepts any expression there, but about the explanation, which should mention the fact that the number of parameters must match the arity of the constructor. |
|
(0008764) garrigue (manager) 2013-01-17 04:12 |
Fixed the manual at revision 13254. (Did not change the BNF, just the explanation) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2013-01-10 07:20 | norm | New Issue | |
| 2013-01-10 08:16 | garrigue | Note Added: 0008733 | |
| 2013-01-10 08:16 | garrigue | Assigned To | => garrigue |
| 2013-01-10 08:16 | garrigue | Status | new => acknowledged |
| 2013-01-17 04:12 | garrigue | Note Added: 0008764 | |
| 2013-01-17 04:12 | garrigue | Status | acknowledged => closed |
| 2013-01-17 04:12 | garrigue | Resolution | open => fixed |
| 2013-01-17 04:12 | garrigue | Fixed in Version | => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |