Aktualizacja:
Od OCaml 4.01.0 (wydana wrzesień 2013) ogólny problem jest taki sam, ale komunikat o błędzie dodaje numer do definicji typu, aby widoczne typy są wewnętrznie inny .
Pełny przykład z old OCaml FAQ w będąc w głównym:
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
#
można pisać kod, który generuje ten błąd? – 0xFF