Experimental implementation of a "dysfunctional" programming language. The idea originates from this presentation by Andras Kovacs: https://www.youtube.com/watch?v=ai4vU1Naopk .
We have a language with two layers, one compile-time layer with full dependent types and a runtime-layer with a simply-typed language without higher-order functions or closures. We can get back higher-order functions and polymorphism in the compile-time layer, but after staging we get a very simple language that is easy to compile.
Try it out:
sbt "run examples/IOExample"
java examples/IOExample
TODO:
- Datatype monomorphization
- Match expressions
- IO
- Interpreter
- Implicit generalization
- JVM bytecode generation
- Foreign datatypes
- Foreign operations
- Integrate foreign with IO
- Do syntax for monads
- Imports
- Add arrays in IO
- Add linearity in Ty
- ST monad
- Opaque definitions
- Safe field access in Con
- Access to Con in pattern matching
- Add IdM, BoolM and IFixM to Meta-level
- Try to write n-ary State monad
- Modules
- Renaming
- Qualified imports
- Import hiding
- Fix modules in staging/compilation
- Rewrite lib and examples to use modules
- Exporting imports
- Private/public definitions
- Some form of type classes
- Search globals
- Approximate unification for globals
- Search locals
- Fix autos from imports
- Order globals
- Rename auto?
- Better syntax for unnamed auto parameters
- Remove implicit generalization
- Linear pairs
- Try to get rid of
boolean bl = false;
in JVM bytecode due to IO - Support trampolines
- Improve syntax for recursive functions
- Higher-kinded type parameters for
- Partially-static data
- Records/variants
- Val Rep: Boxed or Unboxed
BUGS:
- Fix duplicate definitions import bug
- Fix naming issues in datatypes and generated JVM bytecode