Ekdohibs/joujou

A compiler from a small functional language to C. Especially features algebraic effects and handlers with multishot continuations, and a static type system with inference of types and effects, with subtyping.

OCaml

93

68 commits

updated Dec 10, 2018

See the code

README

joujou is a compiler from a small functional language to C.

It supports curried functions, algebraic data types and deep pattern matching,
algebraic effects (with multishot continuations), a static type system with
inference of types and effects, supporting subtyping. It also has a generational
garbage collector included in compiled programs (only the minor generation is
actually collected for now, though).

Its compilation scheme rests on continuation-passing style transformation and
defunctionalisation -- as such, compiled programs are not very efficient. It
however supports efficient application of a n-ary function to all of its
arguments, without building intermediate closures.

Note: see report/report.pdf (in French) for details about the implemented features.

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

algebraic-effects
compiler
continuations
functional-programming
handlers
type-inference

Contributors

Ekdohibs

68 commits

Ekdohibs/joujou

A compiler from a small functional language to C. Especially features algebraic effects and handlers with multishot continuations, and a static type system with inference of types and effects, with subtyping.

OCaml

93

68 commits

updated Dec 10, 2018

See the code

README

joujou is a compiler from a small functional language to C.

It supports curried functions, algebraic data types and deep pattern matching,
algebraic effects (with multishot continuations), a static type system with
inference of types and effects, supporting subtyping. It also has a generational
garbage collector included in compiled programs (only the minor generation is
actually collected for now, though).

Its compilation scheme rests on continuation-passing style transformation and
defunctionalisation -- as such, compiled programs are not very efficient. It
however supports efficient application of a n-ary function to all of its
arguments, without building intermediate closures.

Note: see report/report.pdf (in French) for details about the implemented features.

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

algebraic-effects
compiler
continuations
functional-programming
handlers
type-inference

Contributors

Ekdohibs

68 commits

Languages

OCaml

88.1%

TeX

6.6%

C

4.4%