Casestudies

This folder contains several case studies showcasing the Effekt language and how to use effects and handlers.

You can find the source code online at Github.

Some of the case studies build up on each other. For those, we recommend looking at them in the following order:

  1. Pull-based Lexer: A lexer implementation using effects to express requesting the next token of an input stream.
  2. Backtracking Parser: An implementation of an imperative parser combinator library, that uses the lexer.
  3. Pretty Printer: A pretty printer that uses nondeterminism to search for a layout filling a given width.
  4. ANF Transformation: An implementation of an ANF transformation using a Bind effect. Also composes all four case studies in one pipeline.

Other, independent case studies: