tekknolagi / scrapscript

A functional, content-addressable programming language.
https://scrapscript.fly.dev/repl
Other
376 stars 10 forks source link

Add opt-in HM type checker #152

Closed tekknolagi closed 4 weeks ago

tekknolagi commented 5 months ago

Make a "linter" type inferencer based on Damas Hindley Milner, probably. It will be a little interesting to support lists, records, spreading, etc -- I think we may have some row polymorphism extensions.

We will probably want to use union-find, not the substitution lists (unless we want to do verbose error messages (which would require better line numbers anyway)).

We also have open/polymorphic variants, which is an additional challenge.