[Haskell-cafe] Proposal to solve Haskell's MPTC dilemma
Carlos Camarao
carlos.camarao at gmail.com
Sun May 23 19:54:58 EDT 2010
Sorry to correct myself:
On Sat, May 22, 2010 at 10:24 PM, Carlos Camarao
<carlos.camarao at gmail.com>wrote:
> ...
> =====================================================================
> PS: I think that a definition of orphan/non-orphan instance definition
> for MPTCs should be different.
> Letting: ...
>
instance-def(I,C,M,tv) = I is an instance definition of class C,
> occurring in
> module M, that instantiates class variable tv
>
Should be: instance-def(I,C,M,tv,T) = I is an instance def of class C,
occurring in
module M, that instanticates class
variable tv to datatype T
and replace occurrences of instance-def(I,C,M,tv) to
instance-def(I,C,M,tv,T).
And I think a correct definition of orphan/non-orphan for MPTCs should
be along the line:
> ...
> That is, an instance should be considered non-orphan if there exists
> at least one datatype to which a class type variable in such instance
> is instantiated, because other instances which instantiate such class
> type variable to such datatype would be non-orphan.
>
^^^^ (delete "non-".)
... type variable to such datatype would be orphan.
Cheers,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100523/e05bf3da/attachment.html
More information about the Haskell-Cafe
mailing list