Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.09 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.09 KB

Typesystem

This repo contains some experiments using a bidirectional typechecker. The approach is mostly based upon this tutorial, but adds some extra things:

  • Step by step error reporting
  • Support for typed holes
  • Returns a typed expression, with type information at every node of the tree

The type-variables branch contains some additional code that allows users to specify types containing type variables (unification system based on the Purescript typechecker).

Running the examples

Right now the typechecker and examples are all located in a single file (src/Main.hs).

Execute the following commands to see the results:

$ git clone git@github.com:luc-tielen/typesystem.git
$ nix-shell   # optional, if you prefer using Nix
$ cabal new-configure
$ cabal new-run typesystem

Output for the examples can also be found here.