This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/flap/tests/03-Typing/27-function-in-record.bad.typing.hopix.human-readable
Adrien Guatto 6355f88c0f Jalon 3
2023-11-15 19:08:33 +01:00

11 lines
No EOL
299 B
Text

type f<`a, `b> = { apply : `a -> `b }
fun : int -> int
f (x : int) = x + 1
let boxed_f : f<int, int> = { apply = f }<int, int>
fun : [`a, `b] f<`a, `b> * `a -> `b
apply_boxed_f ((boxed_f : f<`a, `b>), (a : `a)) = boxed_f.apply<`a, `b> (a)
let main : int = apply_boxed_f<int>(boxed_f, 42)