Iocularia is a language, which looks similar to Haskell, but everything is a function. It supports mutual recursion. Its syntax is shown below:
The left hand side of an expression contains, separated by space, the name of the expression and the variables it binds to:
main x
The right hand side can either be a term (the name of another expression or a bound variable) or the application of two right hand sides. In this left associative application, anything that is not a term must be put in brackets.
f x
(f x) g
f (x g)
f g h i
f (g h) i
An expression is a combination of a left hand side and a right hand side, and ends with a semicolon:
id x = x;
The final program that the transpiler outputs is the expression named main
.
The outputted program is a form of indexed lambda calculus, which uses the De Bruijn level (0 indexed).