Is it okay to use the cabal solver to conditionally define dependencies and instances like this?
Haskell Community [Unofficial]
May 14, 2026
clinton:
The problem is, yes, this is an orphan instance, so wherever one wants to use the instance you’ll have to explicitly import the module it comes from which is a bit annoying.
That’s how you’d import plain functions, so I don’t see an issue.
Ultimately a proper solution here would be a new Cabal(/GHC?) feature, somehow giving alice the right to pull alice-bob-instance if bob is also present. This is not the kind of information you can encode into a manifest by yourself.
Also do consider that not everything needs to be an instance. They should be unambiguous, and the QuickCheck discussion above is over a type class that is, well, Arbitrary.
Discussion in the ATmosphere