support for deriving Vector/MVector instances
|Reported by:||jwlato||Owned by:|
|Keywords:||Cc:||ecrockett0@…, hackage.haskell.org@…, remi.turk@…|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Since ghc-7.8, the following is no longer possible:
-- simplified example taken from the vector package class MVectorClass (v :: * -> * -> *) a where basicLength :: v s a -> Int data family MVector s a data instance MVector s Int -- implementation not important newtype Age = Age Int deriving (MVectorClass MVector) -- rejected
Following from discussion in #8177, to enable this ghc would need to support data families with representational matching, such that MVector s Int and MVector s Age are representationally equal.
This has broken some code that previously worked, however as there are some workarounds I'm not sure how important it is.
Change History (12)
comment:4 Changed 2 years ago by jwlato
- Summary changed from data families with representational matching to support for deriving Vector/MVector instances