Inter.h
is a part of VEBLEN --- a functional language similar to the ML-family of languages, Miranda, Alice, Haskell etc. Still highly WIP.
It contains representation of 'enriched' λ-Calc language to serve as level-1 intermediate representation of VEBLEN.
This 'enriched' λ-Calc is taken from Peyton Jones' monograph "The Implementation of Functional Languages" (1987, University of College London).
We can represent this "enriched" form of λ-Calculus with the grammar which Peyton Jones provides at p40:
expr ::= const
| variable
| expr expr # application
| λ '.' pattern '.' expr # abstraction
| "let" pattern '=' expr "in" expr
| "letrec" pattern '=' expr { pattern '=' expr } "in" expr
| expr "[]" expr # infix
| "case" expr of pattern "=>" expr { pattern => expr }
;
pattern ::= const
| variable
| constructor pattern { pattern }
;
My notation is a bit different from what he uses.
An addition to this "enriched" λ-Caclulus is the type system for VEBLEN. I did not bother to remove it. But I did remove memory management macros.
If you stumble upon this, please report any mistakes to .chubak
on Discord or chubakbidpaa [at] riseup [dot] net
(also gamil).
Enjoy.