Is it okay to use the cabal solver to conditionally define dependencies and instances like this?
Haskell Community [Unofficial]
May 14, 2026
Thanks for the link.
Reading it provoked quite a bit of thinking.
On reflection there’s two problems with what I’ve suggested.
- I’ve realised in what I’ve described actually a circular dependency between
aliceandalice-bob-instance, in that they both depend on each other. So I don’t think that will work. - The other issue is that if a package depends directly on
aliceandbobbut only indirectly onalice-bob-instancejust a change in the dependencies of it’s dependencies suddenly can make it break (namely if one of it’s dependencies no longer depends onalice-bob-instance). That’s no good.
There’s does seem to be no better solution than the orphan package and having to explicitly import the orphan package module without an import list, but this does seem deeply unsatisfying.
Discussion in the ATmosphere