Dev log: implementing new syntax in GHC

22 Likes

Excellent writeup. Gnarly process!

1 Like

Thank you for this lovely write-up!

Out of curiosity, why didn’t you use HLS on GHC? You wrote that you didn’t try to use one, was there anything in particular that discouraged you from trying?
It should work on Haskell files out-of-the-box for everything in the compiler directory.

I suppose, if you implemented new syntax you had to modify the parser and HLS doesn’t support alex or happy.
Should we think about supporting .x in HLS? :thinking:

1 Like

To some extent it was just activation energy, I just never felt like taking the time to try it out. I think that’s partly because I didn’t really expect it to work, and I think some reasons for that were: big codebase; custom build system; I never got it working on the codebase at my then-job.

I didn’t modify the lexer btw, so Happy (.y) would have been a higher priority for me than Alex (.x).

2 Likes