Am Donnerstag 19 November 2009 03:03:09 schrieb Henning Thielemann:
> Daniel Fischer schrieb:
> > Am Donnerstag 19 November 2009 01:07:37 schrieb Henning Thielemann:
> >> Seems to be that the author defined an orphan instance - something one
> >> should never do!
> >
> > So what do you do if you need an instance ClassX TypeY but the author of
> > the package that defines TypeY hasn't provided one?
>
> The author (me) has added the instance after it became aware to him (me)
> ...

Of course :)

>
> > You can define an orphan instance or duplicate packageY but with the
> > instance. Both are bad. Providing an orphan instance until packageY has
> > one seems the lesser evil to me. Are there any good options?
>
> A separate package for that orphan instance would be the best solution.

I'm not sure that's really better. With a separate package, you'd have 
dependencies 
packageY, orphanInstance.
When a new version of packageY with the instance is uploaded, things break in 
the same 
way. The fix is easy either way, delete the dependency orphanInstance or delete 
the orphan 
instance, but with a separate package, that stays around polluting hackage - or 
is there 
now a way to remove packages from hackage swiftly?

Perhaps the very best method is to contact the author/maintainer of packageY 
and say you 
need the instance.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to