Another example of an ill-typed program that fails gracelessly with Fatal error: exception Ctype.Unify(_):
module type S = sig
type r and 'b m and x = r and 'a t = S of (x -> 'a m)
val f : 'b m -> 'b m
end
let g {T : S} (T.S f) = f
let f {T:S} ff = T.S (fun r -> T.f (g ff ()))
Another example of an ill-typed program that fails gracelessly with
Fatal error: exception Ctype.Unify(_)
: