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/20-polymorphic-binary-function.bad.typing.hopix.human-readable

23 lines
608 B
Text
Raw Normal View History

2023-11-15 19:08:33 +01:00
fun : [`a, `b] (`a -> `b) * `a -> `b
apply ((f : `a -> `b), (x : `a)) = f (x)
fun : [`a, `b, `c] (`a -> `b -> `c) -> (`a * `b -> `c)
curry (f : `a -> `b -> `c) =
fun : `a * `b -> `c
fc ((x :`a), (y : `b)) = (f (x)) (y);
fc
fun : [`a, `b, `c] (`a * `b -> `c) -> (`b -> `a -> `c)
uncurry (f : `a * `b -> `c) =
fun : `a -> `b -> `c
fu (x : `a) =
(fun : `b -> `c
g (y : `b) = f (x, y);
g);
fu
fun : int -> int
id_int (x : int) = x
let main : int =
(curry<int -> int, int, int> (uncurry<int -> int, int, int> (apply<int, int>))) (id_int, 37)