alms-0.6.0: examples/ex10-dynamic-promotion-blame-error.alms
(* A Lying Dynamic Promotion (like ex8.aff -- blame inc(:>)) *)
let ap : (int -> int) -> int -> int =
fun (f: int -> int) ->
fun (x: int) ->
f (f x) (* f is used twice here, despite what iap2 claims *)
let inc : int -> int =
fun (y: int) ->
(fun (g: int -o int) ->
(ap : (int -> int) -> int -> int
:> (int -o int) -> int -o int) g y) (* This cast goes bad *)
((+) 1)
in print (inc 5)