Continuing with our example, if I am writing some code that does use the text package, and I wish to use your class, I am not concerned about your package depending on text because I already depend upon it myself. On the other hand, if I don't depend on the text package myself, I can't possibly make use of the instance you defined for Text . In this case, a build tool giving me a transitive dependency on text only so that the instance you defined compiles is pointless.

The idea of trimming such contextually unusable instances from builds has made the rounds many times over the years, but I got a bee in my bonnet over a recent reddit post. My initial feeling was negatively hopeless because Cabal configuration flags have been a regular source of pain to me as a Cabal user. They are immediately unsatisfying because we specify a package's dependencies in the form packageName-x.y.z (for some version x.y.z ), with nothing said about flag assignments. Perhaps we should depend on [packageName x.y.z +flagOne -flagTwo] , but one ought to get the feeling that we are treading dangerously close to subverting the notion of version number with this somewhat overlapping, but more general, concept.

Commenters in the above-linked reddit thread made the point that the pruning of inaccessible instances can be entirely automatic. This means that there need be no room for bungled flag settings, or even visible flags at all. If you can't write it, you can't get it wrong.