esmolanka / lambdaf

Experiments with modular lambda calculus using datatypes à la carte and extensible effects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experiments with modularisation of lambda calculus interpreter using datatypes à la carte.

Parts

  • Expr.hs – bare lambda calculus
  • Prim/Base.hs – base primitives and values (unit, pair, double)
  • Prim/Kappa.hs – primitives and values for kappa calculus residual program of a two-level language
  • Prim/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

Checklist

  • [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

About

Experiments with modular lambda calculus using datatypes à la carte and extensible effects

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 95.6%Language:Emacs Lisp 2.9%Language:Nix 1.4%