[GHC] #5939: Standalone deriving Generic on type with instantiated arguments
GHC
cvs-ghc at haskell.org
Wed Mar 14 08:43:51 CET 2012
#5939: Standalone deriving Generic on type with instantiated arguments
------------------------------+---------------------------------------------
Reporter: dreixel | Owner: dreixel
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
Reiner Pope reports that the following code
{{{
{-# LANGUAGE DeriveGeneric, FlexibleInstances, StandaloneDeriving #-}
import GHC.Generics
data T a = T a
deriving instance Generic (T Bool)
}}}
generates the following:
{{{
instance Generic (T Bool) where ...
type instance Rep (T a) = ...
}}}
This is wrong. The type instance should probably be for `Rep (T Bool)`. Or
perhaps we should refuse to derive Generic for instantiated types
altogether.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5939>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list