]>
Zitat von Andrej Bauer <Andrej.Bauer@fmf.uni-lj.si>:
> Here's a simpler example:
>
> # fun (g, x) -> (g true, g x) ;;
> - : (bool -> 'a) * bool -> 'a * 'a = <fun>
>
> Even though it looks like g could be of type 'b -> 'a, ocaml decides to
> go with bool only. I see this on the mailing list every once in a while,
> but I always forget the reasoning behind it.
[...]
g true ===> g is a function applied to a bool; result-type unspecified.
g x ===> x is a bool, because g is a function that takes a bool-arg;
g is explained above.
So, with the application "g true"
you already have fixed the type!
Jonathan's problem is very similar.
Ciao,
Oliver