Derived Data instance requires Data instances for unused type parameters
First reported here: http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018785.html
With this module:
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Data
import Data.Typeable
newtype FSVec s a = FSVec {unFSVec :: [a]}
deriving (Eq, Typeable, Data)
- 12 now has a
Data srequirement on theData (FSVec s a)instance.
With 6.10.4:
*Main> :i FSVec
newtype FSVec s a = FSVec {unFSVec :: [a]}
-- Defined at q.hs:7:8-12
instance (Eq a) => Eq (FSVec s a) -- Defined at q.hs:8:14-15
instance (Data a, Typeable s) => Data (FSVec s a)
-- Defined at q.hs:8:28-31
instance Typeable2 FSVec -- Defined at q.hs:8:18-25
With 6.12 (and the HEAD):
*Main> :i FSVec
newtype FSVec s a = FSVec {unFSVec :: [a]}
-- Defined at q.hs:7:8-12
instance (Eq a) => Eq (FSVec s a) -- Defined at q.hs:8:14-15
instance (Data s, Data a) => Data (FSVec s a)
-- Defined at q.hs:8:28-31
instance Typeable2 FSVec -- Defined at q.hs:8:18-25
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |