> On the bright side, GHC is written in Haskell, and this language is particularly well suited to performing massive refactorings with confidence that nothing breaks. Thus, it should be possible to refactor the GHC library towards a more robust and versatile design
and in fact Simon Peyton Jones continued by saying exactly that:
> You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things. The difficult stuff is envisioning and being very clear about what you’re trying to do. Actually doing it is often not that hard.
So the two texts and the two opinions are completely in alignment. GHC is famously bad insofar as it has a poor design. But once a better design is designed, you can give it the heart transplant it needs without excess stress.
I have no idea how the heart transplant proposed by Sylvain Henry, John Ericson and Jeffrey M. Young is going. I suppose at some point there should be something checked in and a report about how painful or painless it was (and, potentially, if it's really completely wrong, perhaps a series of bug reports in the next seven releases of GHC).
This is possibly the single best example ever of how Computer Scientist and Software Engineer are different jobs with different skill sets.
Work has been steady the master project plan is tracked in this ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17957
Almost all the recent work has been performed by Dominik Peteler (@mmhat) during Google summer of code, which John supervised. We've primarily been focused on landing !8341[0] which makes huge strides in Core w.r.t. modularity (see https://gitlab.haskell.org/ghc/ghc/-/issues/21872), but are on hold until schedules agree and some vacations end.
So the modularity project is far from dead. In fact Sylvain and I are planning on returning to it after we upstream the new Javascript backend (slated for 9.6, see MR!9133[1], tracking ticket[2]) hopefully this week.
PS: That patch is actually a good example of a gnarly lung transplant for GHC's Core IR (and done by a new contributor!).
[0]: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8341
[1]: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9133
That's not my experience. I did small changes in GHC when I had less then 6 months of Haskell experience. I felt the code was pretty straightforward.
I thought GHC was famously a nightmare to work in?
> GHC is not exemplary of good large scale system design in a pure function language. Rather ironically, it violates the properties that draw people to functional programming in the first place: immutability, modularity, and composability
> many new features have been force-fitted into the existing code without proper redesign
> While the current design isn’t glorious, it works
https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf