On Tue, Sep 30, 2003 at 05:49:00PM +0200, Claudio Sacerdoti Coen wrote: > > I suppose that this does not affect binary compatibility, > Well, it is a camlp4 bug that changes the associativity of the arrow > when the first argument is optional ;-((((( > Thus every type expression is parsed incorrectly and being able to compile > the sources becomes a real miracle. Moreover, the .cmi files changes > (since the declared type is utterly incompatible) and the same happens > to the MD5 sum.
Here is the example posted on the ocaml ML: # fun (f : ?x:int -> bool -> float) -> f true;; This expression has type bool but is here used with type ?x:int -> bool Indeed the type of f will be parsed as (?x:int -> bool) -> float instead of the right one: ?x:int -> (bool -> float). Anyway this bug doesn't break binary compatibility in the sense intended by Sven (assuming that I've understood correctly Sven's question). In other words: library built against an ocaml version with this bug (assuming that they can be built up to this bug) would work also with a fixed version of ocaml. The only unfortunate case is of a library that built correctly both with and without the bug, in that case the MD5 sum of their .cmi will change and library build against them wouldn't work with the version rebuilt with the fixed ocaml. I think is really a rare case because it requires that a library export a method as the f above, not used by other functions of the same library (otherwise they would spot the type error) and libraries rebuilt against it not using the f method (otherwise they would spot the error as before). > Anyway, to my knowledge no major debian package uses both camlp4 and > optional arguments (Coq does use camlp4 heavily, but no optional > args; the other packages do use optional arguments, but no camlp4). > [But there are a few ocaml debian packages I have never used...] OT: I'm almost sure that tons of the HELM's code use that stuff :-) But ok, this is not a debian problem ... > My 2 cents, Thanks BTW Jacques Garrigue is working on it, not Pierre Weiss, my fault. Cheers. -- Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney
signature.asc
Description: Digital signature