# Dev log: implementing new syntax in GHC

**URL:** <https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319>\
**Category:** Links\
**Created:** [June 25, 2026, 10:54pm UTC](https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319 "2026-06-25T22:54:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philh](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@philh](https://discourse.haskell.org/u/philh)\
**Post date:** [June 25, 2026, 10:54pm UTC](https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319/1 "2026-06-25T22:54:42Z")

</div>

> **[Dev log: implementing new syntax in GHC](https://reasonableapproximation.net/2026/06/25/dev-log-ghc-syntax.html)**

---

<div class="post-metadata">

**Author:** ![simonmic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/simonmic/32/1796_2.png) [@simonmic](https://discourse.haskell.org/u/simonmic)\
**Post date:** [June 27, 2026, 6:50am UTC](https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319/2 "2026-06-27T06:50:53Z")

</div>

Excellent writeup. Gnarly process!

---

<div class="post-metadata">

**Author:** ![fendor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/fendor/32/376_2.png) [@fendor](https://discourse.haskell.org/u/fendor)\
**Post date:** [June 27, 2026, 5:46pm UTC](https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319/3 "2026-06-27T17:46:58Z")

</div>

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? 🤔

---

<div class="post-metadata">

**Author:** ![philh](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@philh](https://discourse.haskell.org/u/philh)\
**Post date:** [June 28, 2026, 7:46am UTC](https://discourse.haskell.org/t/dev-log-implementing-new-syntax-in-ghc/14319/4 "2026-06-28T07:46:38Z")

</div>

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`).
