[Haskell-beginners] Orphan instances
byorgey at seas.upenn.edu
Fri Nov 23 03:39:35 CET 2012
On Thu, Nov 22, 2012 at 10:55:59PM +0100, Emmanuel Surleau wrote:
> Hi there,
> I have a design issue, which is causing me to generate orphan instances. I'm
> writing a small program which persists data to a database. In order to be able
> to switch between different backends, I have a Store typeclass in one module,
> which is exposed to the frontend, and which has instances in each backend
> module. But obviously, the backend instances are therefore orphan.
This is not obvious to me. What types are you making an instance of
Store, and why must they be defined elsewhere?
Also, orphan instances internal to your own library are Not A Big Deal.
More information about the Beginners