Home

Awesome

higher-rank

A small Haskell implementation of Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism. This is a sister project to the Racket implementation, which is adapted from this one.

This implementation is designed to be both simple and relatively complete. Where the two conflict, it prefers simplicity. This means that there is no source location reporting for type errors, for example, which would considerably complicate the implementation, but it does attempt to provide good error messages with the information it has.

The executable built by this project implements a simple REPL. You can run it from the command line with stack:

$ stack build
$ stack exec higher-rank
> ()
() : ()
> (\x -> x)
(\x -> x) : (a1' -> a1')
> ((\x -> x) ())
() : ()

The implementation is divided among the following modules: