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: 4732 Reporter: zack Assigned to: ertai Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z) Resolution: fixed Priority: normal Severity: major Version: 3.11.0 Fixed in version: 3.12.1+dev Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Monitored by: "Richard Jones" @Chris00 zack
Bug description
Looks like there is a conflict between cpp-like macros (as enabled by the camlp4.macro package) and all uppercase polymorphic variants.
I've set severity major, because this bug currently inhibit using camlp4 with libraries which require all uppercase macros in their API. A notable example is lablgtk2, which uses stuff like IN, OUT, ...
Here is how to reproduce (using findlib):
$ ledit ocaml
Objective Caml version 3.11.0
#use "topfind";;
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
#camlp4o;;
/usr/lib/ocaml/3.11.0/dynlink.cma: loaded
/usr/lib/ocaml/3.11.0/camlp4: added to search path
/usr/lib/ocaml/3.11.0/camlp4/camlp4o.cma: loaded
Camlp4 Parsing version 3.11.0
Actually, the bug title is misleading. It is not the case that all uppercase polymorphic variants cannot be parser, but only `IN (which is possibly a keyword for the new camlp4).
Nevertheless the problem stands, partly because IN is used by libraries out there (e.g. lablgtk2), partly because the bug appears only when you use the camlp4.macro package, which makes harder for library published to know they should refrain from using IN.
The "IN" comes from local macros "DEFINE ... IN ...". For now, you may want to use Delimited overloading http://forge.ocamlcore.org/projects/pa-do/ macros which does not have that problem.
Original bug ID: 4732
Reporter: zack
Assigned to: ertai
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11.0
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: "Richard Jones" @Chris00 zack
Bug description
Looks like there is a conflict between cpp-like macros (as enabled by the camlp4.macro package) and all uppercase polymorphic variants.
I've set severity major, because this bug currently inhibit using camlp4 with libraries which require all uppercase macros in their API. A notable example is lablgtk2, which uses stuff like
IN,
OUT, ...Here is how to reproduce (using findlib):
$ ledit ocaml
Objective Caml version 3.11.0
#use "topfind";;
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
#camlp4o;;
/usr/lib/ocaml/3.11.0/dynlink.cma: loaded
/usr/lib/ocaml/3.11.0/camlp4: added to search path
/usr/lib/ocaml/3.11.0/camlp4/camlp4o.cma: loaded
Camlp4 Parsing version 3.11.0
`IN;; (* plain camlp4, works fine *)
IN ] =
IN#require "camlp4.macro";;
/usr/lib/ocaml/3.11.0/camlp4/Camlp4Parsers/Camlp4MacroParser.cmo: loaded
`IN;; (* no longer works *)
Error: Parse error: [a_ident] expected after "`" (in [expr])
`In;; (* if we renounce to all uppercase, it works again :-/ *)
In ] =
InThe text was updated successfully, but these errors were encountered: