orphans

Ian Lynagh igloo at earth.li
Fri Aug 15 19:10:55 EDT 2008


On Sat, Aug 16, 2008 at 12:00:07AM +0100, Simon Peyton-Jones wrote:
> It's only an orphan if the rule's LHS mentions no locally-defined type. In this case, the LHS doesn't appear to mention IOArray, but it does really because there's an invisible type argument.

Aha! I hadn't noticed how the rule got desugared.

> However IOArray is defined in GHC.IOBase, so indeed the rule is an orphan.  Why can't the instance be put with the class decl?

OK, yes, I think we're fine then. We'll just have to move thawIOArray
into GHC.IOBase too, but that seems fine given it's specific to GHC
and its definition of IOArray.


Thanks
Ian



More information about the Cvs-libraries mailing list