External Publication
Visit Post

Is it okay to use the cabal solver to conditionally define dependencies and instances like this?

Haskell Community [Unofficial] May 14, 2026
Source

Thanks for the link.

Reading it provoked quite a bit of thinking.

On reflection there’s two problems with what I’ve suggested.

  1. I’ve realised in what I’ve described actually a circular dependency between alice and alice-bob-instance, in that they both depend on each other. So I don’t think that will work.
  2. The other issue is that if a package depends directly on alice and bob but only indirectly on alice-bob-instance just a change in the dependencies of it’s dependencies suddenly can make it break (namely if one of it’s dependencies no longer depends on alice-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

Loading comments...