Version 186 (modified by benl, 7 years ago) (diff)


The Disciplined Disciple Compiler (DDC)

Disciple is a dialect of Haskell that uses strict evaluation as the default and supports destructive update of arbitrary data structures. Disciple includes region, effect and closure typing, and this extra information provides a handle on the operational behaviour of code that isn't available in other languages. Programs can be written in either a pure/functional or effectful/imperative style, and one of our goals is to provide both styles coherently in the same language. The two styles can be mixed safely, for example: when using laziness the type system guarantees that computations with visible side effects are not suspended. Many Haskell programs are also Disciple programs, or will run with minor changes. Our target applications are the ones that you always find yourself writing C programs for, because existing functional languages are too slow, use too much memory, or don't let you update the data that you need to.

DDC is still in the "research prototype" stage, meaning that it will compile programs if you are nice to it, but expect compiler panics and missing features. You'll get panics due to ungraceful handling of errors in the source code, but valid programs should compile ok. Here are some working examples, along with their Disciple source code:

Ray Tracer N-Body Styrene
No image "raytracer-thumb.png" attached to WikiStart No image "nbody-thumb.png" attached to WikiStart No image "styrene-thumb.png" attached to WikiStart
(code) (code) (code)

State of Play

This section summarises the main changes to the repository over the last month.

  • 23/3/2012 Ben: Added the Core Sea language fragment. This uses the same AST definition as the full core language, but is restricted to just the features that can be mapped directly onto the C language. We're using a language fragment instead of a separate IR to eliminate the need for a separate parser and type checker for it. I also started working on the LLVM backend, firstly by cleaning up the binding we inherited from GHC.
  • 19/3/2012 Amos: Work on the Core language rewrite rule framework. Rewrite rules can now be type checked and added to the ddci-core state.


Getting Started


How you can help

  • Download the compiler, write programs, and file bug reports!

How to get help

Further Reading