Homomorphic static analysis
Haskell Community [Unofficial]
June 1, 2026
maralorn:
Yes, that’s exactly what I tried and which I couldn’t figure out. I need to somehow detect that
Compose (First ...) (Second ...)is the same asCompose (First ...) (Fun id (Second ...))unless I want to hurt Arrow/Profunctor laws and I have no idea how to do that, because I can’t do an equality check ona -> a.
The overloaded package provides compiler plugins, one of them is for better Arrow desugaring and avoiding the arr combinator.
You could use this, if you’re willing to depend on a GHC compiler plugin. You could have overloaded:categories desugar into your own Operation DSL, which may then implement Eq.
Discussion in the ATmosphere