#4028: Derived Data instance requires Data instances for unused type parameters
----------------------------------------+-----------------------------------
    Reporter:  igloo                    |        Owner:              
        Type:  bug                      |       Status:  new         
    Priority:  normal                   |    Milestone:  6.14.1      
   Component:  Compiler (Type checker)  |      Version:  6.12.2      
    Keywords:                           |   Difficulty:              
          Os:  Unknown/Multiple         |     Testcase:              
Architecture:  Unknown/Multiple         |      Failure:  None/Unknown
----------------------------------------+-----------------------------------
 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)
 }}}
 6.12 now has a `Data s` requirement on the `Data (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
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4028>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to