Experiments with modularisation of lambda calculus interpreter using datatypes à la carte.
Expr.hs
– bare lambda calculusPrim/Base.hs
– base primitives and values (unit, pair, double)Prim/Kappa.hs
– primitives and values for kappa calculus residual program of a two-level languagePrim/Record.hs
– support of records (create, extend, select)Prim/Variant.hs
– support of variants (create, eliminate)Prim/IO.hs
– support of IO (read line from stdin, write line to stdout)Prim/Exception.hs
– support of exceptions (raise, catch)Prim/Link.hs
– support of dynamic loading of expressions from other files, typechecking them and running in the same runtime context as the parent program runs
- [X] Modularised evaluation, typechecking, side-effecting, and pretty-printing aspects of sublanguages
- [X] Add variant construction and elimination (case expressions)
- [X] Make exceptions use variants
- [X] Type system with higher-rank polymorphism and bidirectional type-checker
- [ ] Add Koka-style extensible effects to bidirectional type-checker
- [ ] Add isorecursive types (μ-types)
- [ ] Add paramorphisms (== primitive recursion) for elimination of μ-types
- [ ] Add type variable constraints; needed for overloaded literals and operations on numbers
- [ ] Add lists and on-the-fly μ-type/paramorphisms machinery for elimination
- [ ] Use subsumption checking and coercion for dynamically loaded expressions
- [ ] Add vector type and vector sublanguage (and the Nat kind?)
- [ ] Patterns and pattern-matching