[Haskell-cafe] Instance deps (was: [announcement] filtrable: class of filtrable containers)

M Farkas-Dyck m.farkasdyck at gmail.com
Thu Feb 18 02:38:34 UTC 2016


2 options readily come to mind:

• For each pair of packages (P, Q) where either has potential
instances of a class in the other, we define these as orphans in yet
another package R and tell this somehow in the cabal files of P and Q.
If any package transitively depends on both P and Q it automatically
sees the instance in R wherever all its types are in scope.
Potential problem: quadratically many packages needed

• We can mark some deps Qs in the cabal file of package P as only
needed to define instances of their classes for our types or for their
types for our classes. If a package which depends on P would not
otherwise transitively depend on Q, these instances and dependencies
are ignored.


More information about the Haskell-Cafe mailing list