3 ms·
Learning Haskell via implementing a type system and type inference on a simple functional language. https://github.com/jin/hindley-milner https://github.com/ji
by jingwen 10y ago
Learning Haskell via implementing a type system and type inference on a simple functional language.
https://github.com/jin/hindley-milner https://github.com/jin/hindley-milner
Typeclasses were surprisingly easy to grasp. Got tripped up for a couple of days trying to implement a way to generate fresh variables ("a", "b", ...) and ultimately grokked the State monad to implement it.