A simple positive supercompiler.
make [tests | repl | sc | clean]
repl
--- run Haskell interpretersc
--- build executabletests
--- compile and run tests
- ghc
- make
- Text.PrettyPrint module
- Text.Parsec.* modules
Term := V -- variable
| N -- number
| func(Term, ..., Term) -- builtin function
| pred(Term, ..., Term) -- builtin predicate
| Term Term -- application
| \V -> Term -- lambda abstraction
| Constructor(Term, ..., Term) -- constructor
| Function -- function
| let V = Term in Term -- let expresstion
| case Term of { Con V ... V => Term; ... } -- case expresstion
Definition := V = Term -- function definition (name = body)
Program := (V, Definition, ..., Definition) -- program (entry point and functions)