Thank you for your answers, but you aimed too high above my
understanding :-)

-[ Sat, Aug 06, 2011 at 02:58:49PM +0200, Fabrice Le Fessant ]----
> The type constraint that you specified does not constraint the
> polymorphism of the type. To declare a polymorphic constraint, you must
> use (with OCaml >= 3.12.0) :
> 
> let pipe : 'a 'b 'c. ('a, 'b) parzer -> ('c, 'a) parzer -> ('c, 'b) parzer =

Never saw this notation before. I checked in the manual but beside in
the language grammar (in the definition of a poly-typexpr) I could find
more explanation.
Is it explained somewhere why this notation was required and why this:

let pipe : ('a, 'b) parzer -> ('c, 'a) parzer -> ('c, 'b) parzer =

is not enough? What's adding the "'a 'b 'c. " exactly ? I understand
that it forbids ocaml to consider that the various 'a (for instance) may
be differents 'a, but I don't understand why ocaml migh do that in the
first place (especially to produce a _less general_ type than the one
given) ? If it's not a bug, then what's the purpose ?

As for my second question, I received no answer (was: why changing the
pattern match for something that should be equivalent changes the infered
type). If you suspect this can be a bug then I can look for a simple
reproductible case.



-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to