Generalized newtype deriving with associated types
|Reported by:||LouisWasserman||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
When I have a
class Foo a where type Bar a foobar :: a -> Bar a
instance Foo Fooey ...
newtype Fooey2 = F2 (Fooey) deriving (Foo)
I expect the automatically generated deriving to include
type Bar Fooey2 = Bar Fooey
but this is not the case: I cannot get an associated type from a newtype to resolve to anything. My guess is that the combination of -XTypeFamilies and -XGeneralizedNewtypeDeriving is rare enough that this may simply not have been thought of yet, but it's something I'd like to see fixed.
Change History (5)
Changed 7 years ago by LouisWasserman
comment:1 Changed 7 years ago by LouisWasserman
- Resolution set to duplicate
- Status changed from new to closed