News for hackers. Stuff that matters.
Re:GHC Parser Principles by danharaj on Monday May 14, 2018 @07:20PM (#17070291)
I have a commit on GHC (a very modest one). The compiler is written in a mix of somewhat old Haskell style and new which makes sense since it's one of the oldest and largest codebases in the language. There is a constant drive to modernize it and some new techniques come out of GHC architectural changes [0].

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.

[0] https://arxiv.org/abs/1610.04799

Re:GHC Parser Principles by piinbinary on Monday May 14, 2018 @10:12PM (#17071111)
I appreciate the pun in that paper:

  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.
Re:GHC Parser Principles by endgame on Tuesday May 15, 2018 @02:29AM (#17072057)
Can you go into more detail about the [note] system?
Re:GHC Parser Principles by ufo on Tuesday May 15, 2018 @02:56AM (#17072145)
Simon Marlow and Simon Peyton-Jones wrote a chapter about GHC for the Architecture of Open Source Applications ebook and they talk about the note system there. Skip to section 5.6.

http://www.aosabook.org/en/ghc.html