
18 Feb
2016
18 Feb
'16
2:38 a.m.
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.