Hello,<div><br></div><div>There are a number of libraries like syb-with-class, happstack-data, etc, which provide a new class that potentially has a lot of new instances.</div><div><br></div><div>For example, let&#39;s say I want a &#39;Data ctx Text&#39; instance. Where should that go?</div>
<div><br></div><div>To avoid orphan instances it would need to go in the &#39;text&#39; package where Text is defined. But it seems unlikely that I am going to convince the authors of text to add additional dependencies on things like syb-with-class, happstack-data, etc, just to satisfy a small number of users.</div>
<div><br></div><div>A second place to put the instance would be in the syb-with-class package. They will be orphan instances, but as long as you can&#39;t import the Data class without also getting those instances, it doesn&#39;t seem like much could go wrong.  But now syb-with-class has to depend on all the libraries that it is going to provide instances for. So, I have just shifted the problem from one library to another.</div>
<div><br></div><div>A third option is to just define the instance in the library where I want to use it. But now I have opened up the possibility of conflicting orphan instances for the type -- which is no good.</div><div>
<br></div><div>A fourth option is to create a new package which contains just the instance. For example:</div><div><br></div><div>syb-with-class-text</div><div><br></div><div>This still opens the possibility of conflicting orphan instances. But at least there is a version that is supposedly the &#39;official&#39; one. </div>
<div><br></div><div>The problem is that it seems like this might really clutter up hackage? Also, it is annoying to have to create and maintain and entire new cabal package just for one single class instance. And if i want to install all the instances, it would be annoying to have to do 20 different cabal installs.</div>
<div><br></div><div>What might be nicer is if I could have a single project directory that somehow generated all those instances. And if cabal new how to work with them as a family.  Something like:</div><div><br></div><div>
 cabal upload syb-with-class*</div><div> cabal install syb-with-class*</div><div><br></div><div>Obviously, I have not really thought this through all the way. I just know that I am continually wondering what I should do when I want to do something like add a Text instance for syb-with-class? </div>
<div><br></div><div>If we were to get really experimental I might suggest that when you install syb-with-class, you don&#39;t automatically get all the extra instances by default. But the package system and compiler would know they exist. So if you tried to write code that required the missing instance, it would suggest that you need to install the extra package. This would help reduce instances of people accidentally creating a conflicting instance. But I am sure it makes something else horrible happen instead ;)</div>
<div><br></div><div>- jeremy</div>