Changes between Initial Version and Version 1 of Ticket #14331, comment 14


Ignore:
Timestamp:
Oct 13, 2017 1:06:23 PM (2 years ago)
Author:
RyanGlScott
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14331, comment 14

    initial v1  
    88}}}
    99
    10 In other words, you should unify `r` with `a`. After all, the `a` in `data D a = D deriving (C (a :: k))` scopes over the data type, not the `deriving` clause!
     10In other words, you should unify `r` with `a`. After all, the `a` in `data D a = D deriving (C (a :: k))` is bound by the data type, not the `deriving` clause!
    1111
    1212Now if you had chosen to use a different scoping with `data D a = D deriving (forall (a :: k). C a)`, //then// I could see the instance being derived that you suggested. But I don't think users would expect that behavior to be the default (that is, in lieu of explicit `forall`s on a `deriving` clause, one should assume that the user-written type variables are bound by the data type if they appear in the `<tvbs>` in `data D <tvbs>`).