DeriveDataTypeable - deriving Data for several type constructor applications
{-# 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.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |