by danharaj · 8y ago · 0 comments
I didn't work with the parser, mostly the constraint solver in the type checker. Still, I browsed quite a bit of code. It's one of the most pleasant and well documented codebases I've worked in in any language. In particular, the [note] system is an excellent way to embed long form documentation that touches many components without using fancy doc tools: grep suffices.
If you want to see what a large, old, industrial grade Haskell project looks like I think GHC is a good place to look. And if you ever run into trouble with GHC then I encourage you not to be afraid to hack on it. The code won't bite and the maintainers have no shortage of patience for newcomers.
Algebraic Data Types (ADTs) and pattern matching in functional languages
lay a fertile ground to conveniently define and process data types as tree-like
structures. However, in these grounds, trees often cannot grow; once a data type
is defined and compiled, its definition cannot be extended.