| Anonymous | Login | Signup for a new account | 2013-06-20 05:32 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 | ||||||
| 0005048 | OCaml | Camlp4 | public | 2010-05-14 20:03 | 2012-09-18 13:16 | ||||||
| Reporter | cfalls | ||||||||||
| Assigned To | xclerc | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.2 | ||||||||||
| Target Version | 4.00.2+dev | Fixed in Version | |||||||||
| Summary | 0005048: Labeled arguments parsed differently on camlp4 versus regular compiler | ||||||||||
| Description | # let f ?(foo=()) _x _y z = z;; With camlp4: # (f 1 2) ~foo:();; - : '_a -> '_a = <fun> Without camlp4: # (f 1 2) ~foo:();; - : (foo:unit -> '_a) -> '_a = <fun> | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005454) garrigue (manager) 2010-05-15 03:02 |
In order to handle properly optional arguments, application is n-ary. That is [(f 1 2) ~foo:()] andf [f 1 2 ~foo:()] are not equivalent. It looks like camlp4 is merging the two applications into one. Jacques |
|
(0007753) cfalls (reporter) 2012-07-13 23:32 |
There's another issue that I think is just another manifestation of this one. In Core, we define: let failwithf fmt = ksprintf (fun s () -> failwith s) fmt Then, [(failwithf "foo" ()) 3] produces a warning about unused arguments only when not using camlp4. (Note that [failwithf "foo" () 3] doesn't produce the warning in either case. It would be nice if it did, but that's a separate issue.) |
|
(0007966) hongboz (developer) 2012-08-22 12:23 |
garrigue is right. camlp4 seems to merge the two applications |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-05-14 20:03 | cfalls | New Issue | |
| 2010-05-14 20:03 | cfalls | Status | new => assigned |
| 2010-05-14 20:03 | cfalls | Assigned To | => ertai |
| 2010-05-15 03:02 | garrigue | Note Added: 0005454 | |
| 2011-10-26 08:44 | ertai | Assigned To | ertai => xclerc |
| 2012-07-10 20:29 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-13 23:32 | cfalls | Note Added: 0007753 | |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-08-22 12:23 | hongboz | Note Added: 0007966 | |
| 2012-09-18 13:16 | doligez | Target Version | 4.00.1+dev => 4.00.2+dev |
| Copyright © 2000 - 2011 MantisBT Group |