Awesome
higher-rank
A Racket implementation of Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism using the techniques outlined in Type Systems as Macros. This is a sister project to the simpler Haskell implementation from which it is adapted.
This project should be installed as a Racket package, and it defines #lang higher-rank
. You can run a REPL from within DrRacket, or you can use the command line:
$ cd racket-higher-rank
$ raco pkg install
$ racket -iI higher-rank
Welcome to Racket v6.8.0.3.
> unit
: Unit
#<unit>
> (lambda x x)
: (-> g1^ g1^)
#<procedure:...er-rank/main.rkt:70:18>
> ((: (lambda id ((id (lambda x x)) (id unit)))
(-> (forall a (-> a a)) Unit))
(lambda x x))
: Unit
#<unit>