diprism / perpl

The PERPL Compiler
MIT License
10 stars 5 forks source link

Hindley Milner - Function Polymorphism #45

Closed colin-mcd closed 2 years ago

colin-mcd commented 2 years ago

I think this branch is now stable and can be merged... Some changes include:

  1. No more type annotations necessary! define foo = \ x. \ y. ...
  2. Function polymorphism: define compose = \ f. \ g. \ x. f (g x) can be used with multiple type parameter instantiations
  3. Changed &-elimination from a.i to let <_, ..., x, ..., _> = a in .... This nicely complements *-elimination
  4. Numerous corner-case bug fixes, mostly to do with generating FGG rules
colin-mcd commented 2 years ago

Resolves #17 and fixes #43.