[GHC] #12439: DeriveDataTypeable - deriving Data for several type constructor applications

GHC ghc-devs at haskell.org
Tue Jul 26 15:03:34 UTC 2016


#12439: DeriveDataTypeable - deriving Data for several type constructor
applications
-------------------------------------+-------------------------------------
           Reporter:  lspitzner      |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!hs
 {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
 import qualified Data.Data

 data Mu f = Mu (f (Mu f))
 deriving instance Data.Data.Data (Mu [])
 deriving instance Data.Data.Data (Mu IO)
 }}}

 produces

 {{{
     Multiple declarations of ‘$t3Ecq4GuAmh1HtkHHwEpyjp’
     [..]
     Multiple declarations of ‘$c3Ecq4GuAmh1HtkHHwEpyjp’
     [..]
     Duplicate type signatures for ‘$t3Ecq4GuAmh1HtkHHwEpyjp’
     [..]
     Duplicate type signatures for ‘$c3Ecq4GuAmh1HtkHHwEpyjp’
     [..]
 }}}

 As a workaround one can define instances in separate modules.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12439>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list