
#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