Update:
Seit OCaml 4.01.0 (veröffentlicht September 2013) das allgemeine Problem ist das gleiche, aber die Fehlermeldung fügt eine Zahl der Typdefinition, machen deutlich, die Typen intern unterschiedlich sind .
Voll Beispiel aus dem old OCaml FAQ im Toplevel:
type counter = Counter of int;; (* define a type *)
type counter = Counter of int
# let x = Counter 1;; (* use the new type *)
val x : counter = Counter 1
type counter = Counter of int;; (* redefine the type, use it *)
type counter = Counter of int
# let incr_counter c = match c with Counter x -> Counter (x + 1);;
val incr_counter : counter -> counter = <fun>
# incr_counter x;; (* now mix old and new defs *)
Error: This expression has type counter/1029
but an expression was expected of type counter/1032
#
können Sie nach dem Code, der diesen Fehler erzeugt? – 0xFF