# Share useful GHC plugins

**URL:** <https://discourse.haskell.org/t/share-useful-ghc-plugins/13305>\
**Category:** Uncategorized\
**Created:** [November 21, 2025, 12:03am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305 "2025-11-21T00:03:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashokkimmel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ashokkimmel/32/5111_2.png) [@ashokkimmel](https://discourse.haskell.org/u/ashokkimmel)\
**Post date:** [November 21, 2025, 12:03am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/1 "2025-11-21T00:03:22Z")

</div>

I know of a few ghc plugins:  
`norecursion`: Allows for making recursion useful, avoiding recursion bugs.  
`ghc-typelits-normalize` Allows for making Type level  
`typelet`: Allows type level let  
`monadic-bang`: Allows for idris `!` syntax.  
There is also the `polysemy` and or-constraint ones.  
I just saw `monadic-bang` and it seemed cool, and I began to wonder what other cool plugins there are that could make the haskell experience better?

---

<div class="post-metadata">

**Author:** ![LaurentRDC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/laurentrdc/32/4950_2.png) [@LaurentRDC](https://discourse.haskell.org/u/LaurentRDC)\
**Post date:** [November 21, 2025, 12:12am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/2 "2025-11-21T00:12:26Z")

</div>

[opentelemetry-plugin](https://github.com/MercuryTechnologies/opentelemetry-plugin) to hook up OpenTelemetry to GHC and measure various thing about building Haskell programs.

I’ve never used it though!

---

<div class="post-metadata">

**Author:** ![unhammer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/unhammer/32/580_2.png) [@unhammer](https://discourse.haskell.org/u/unhammer)\
**Post date:** [November 21, 2025, 9:48am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/3 "2025-11-21T09:48:02Z")

</div>

liquid haskell? [Implementing a GHC Plugin for Liquid Haskell - Well-Typed: The Haskell Consultants](https://well-typed.com/blog/2020/08/implementing-a-ghc-plugin-for-liquid-haskell/)

---

<div class="post-metadata">

**Author:** ![evincar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/evincar/32/3594_2.png) [@evincar](https://discourse.haskell.org/u/evincar)\
**Post date:** [November 21, 2025, 1:21pm UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/4 "2025-11-21T13:21:50Z")

</div>

I use `monadic-bang` all the time and it’s great. I still think it should be a native extension, because there are a few issues with plugins that add syntax.

- When there’s a syntax error anywhere in the file, there will be a syntax error for each `!expression` as well
- There’s no way to integrate with code formatters — Ormolu has no idea what’s going on and fails at the first `!expression`
- It would be nice to allow a low-precedence form `<- expression` instead of (or in addition to) the high-precedence `!expression`, because in practice, having `!` be high-precedence doesn’t allow me to drop parentheses very often, and I’d rather write `if <- f x then …` instead of `if !(f x) then …`, and `f (<- g x) <- h y` instead of `f !(g x) !(h y)`

---

<div class="post-metadata">

**Author:** ![ocharles](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ocharles/32/102_2.png) [@ocharles](https://discourse.haskell.org/u/ocharles)\
**Post date:** [November 22, 2025, 9:59am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/5 "2025-11-22T09:59:25Z")

</div>

Not exactly useful at the moment, but I always wanted to continue my assert-explainer plugin: [GitHub - ocharles/assert-explainer: Py.test style assertions in Haskell](https://github.com/ocharles/assert-explainer)

---

<div class="post-metadata">

**Author:** ![GunpowderGuy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/gunpowderguy/32/4164_2.png) [@GunpowderGuy](https://discourse.haskell.org/u/GunpowderGuy)\
**Post date:** [November 22, 2025, 2:36pm UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/6 "2025-11-22T14:36:49Z")

</div>

The final work i did for the GSoC that just ended was a GHC plugin that serializes and deserializes cmm . Cmm being the GHC code generation IR. It gets translated from a higher level IR and then translated directly to machine code, to llvm or to wasm

> **[cmm-documentation/custom-plugin at master · GunpowderGuy/cmm-documentation](https://github.com/GunpowderGuy/cmm-documentation/tree/master/custom-plugin)**
>
> GSoC project to documment and improve the tooling for cmm ( GHC ) - GunpowderGuy/cmm-documentation

---

<div class="post-metadata">

**Author:** ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Post date:** [November 22, 2025, 4:30pm UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/7 "2025-11-22T16:30:13Z")

</div>

One of my goals in Skeletest is to provide helpful error messages. If you like pytest, you might also like the Fixtures mechanism.

> **[skeletest](https://hackage.haskell.org/package/skeletest)**
>
> Batteries-included, opinionated test framework

---

<div class="post-metadata">

**Author:** ![chrisdone](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/chrisdone/32/1408_2.png) [@chrisdone](https://discourse.haskell.org/u/chrisdone)\
**Post date:** [November 23, 2025, 10:07am UTC](https://discourse.haskell.org/t/share-useful-ghc-plugins/13305/8 "2025-11-23T10:07:03Z")

</div>

On a similar topic, I have a [simple TH function](https://github.com/chrisdone-archive/inflex/blob/master/inflex-lang/test/Match.hs) that lets you match on data structures without having to state all sub-parts of the structure. In the example below I’ve omitted various fields (like source location information which is verbose), and used \_ where ArrayExpression was important, but its content wasn’t. It’s like writing a case but without having to write the RHS or wildcard case. My hope for a follow up would be having it report the diff rather than a simple boolean. I think if you have an instance of Lift, you could diff on the AST.

> <https://github.com/chrisdone-archive/inflex/blob/master/inflex-lang/test/ParseSpec.hs#L1600>

Your example could be e.g. `shouldBeLift xs [| [_,_,_] |]` which is occasionally nicer, depending on the task. But it’s only a subset of the things your plugin can help with, which is much broader.
