Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004216OCamlCamlp4public2007-02-23 21:072009-03-31 13:03
Reporterwneumann 
Assigned Toertai 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.10+dev 
Target VersionFixed in Version3.11.0 
Summary0004216: camlp4 not accepting some valid ocaml syntax
DescriptionTwo problems have recently come to light when trying to build Gerd Stolpmann's ocamlnet-2.2.4 with the CVS version of ocaml (3.10+24). Both issues involve camlp4 not accepting syntax that OCaml does (and that camlp4 version 3.09.3 accepted as well).

The first involves polymorphic variants: camlp4 no longer accepts definitions where a | character precedes the first variant, e.g. type t = [ | `A | `B ]. This can be seen from the command line:

[251] 12:48PM% camlp4o -printer o -str 'type t = [ | `A | `B ]'
File "/tmp/from_string7b9067.ml", line 1, characters 11-12:
Parse error: ">" or [row_field] expected after "[" (in [ctyp])


The second issue involves the declaration of external functions where one supplies separate C functions for native and bytecode compilation. Here, camlp4 doesn't appear to treat the second, native function as part of the declaration. This can be seen from the command line as well:

[248] 12:45PM% camlp4o -printer o -str 'external add6 : int -> int -> int -> int -> int -> int -> int = "add_six_byte" "add_six_nat"'
external add6 : int -> int -> int -> int -> int -> int -> int =
 "add_six_byte"
let _ = "add_six_nat"
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003948)
ertai (developer)
2007-02-26 17:50

Now fixed in CVS.

Thanks for reporting them.

- Issue History
Date Modified Username Field Change
2007-02-23 21:07 wneumann New Issue
2007-02-26 17:50 ertai Note Added: 0003948
2007-02-26 17:50 ertai Assigned To => ertai
2007-02-26 17:50 ertai Status new => resolved
2007-02-26 17:50 ertai Resolution open => fixed
2009-03-31 13:03 xleroy Status resolved => closed
2009-03-31 13:03 xleroy Fixed in Version => 3.11.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker