[GHC] #12438: DeriveDataTypeable - deriving instance Data (Mu (Const ()))
GHC
ghc-devs at haskell.org
Tue Jul 26 14:59:23 UTC 2016
#12438: DeriveDataTypeable - deriving instance Data (Mu (Const ()))
-------------------------------------+-------------------------------------
Reporter: lspitzner | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by lspitzner:
@@ -2,1 +2,1 @@
- {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving, PolyKinds #-}
+ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
New description:
{{{#!hs
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
import qualified Data.Data
data Mu f = Mu (f (Mu f))
deriving instance Data.Data.Data (Mu (Const ()))
}}}
produces
{{{
• No instance for (Data (Const () (Mu (Const ()))))
arising from a use of ‘k’
• In the expression: (z Mu `k` a1)
In an equation for ‘gfoldl’: gfoldl k z (Mu a1) = (z Mu `k` a1)
When typechecking the code for ‘gfoldl’
in a derived instance for ‘Data (Mu (Const ()))’:
To see the code I am typechecking, use -ddump-deriv
In the instance declaration for ‘Data (Mu (Const ()))’
}}}
while other type constructors work, e.g.
{{{#!hs
deriving instance Data.Data.Data (Mu [])
deriving instance Data.Data.Data (Mu ((,) ()))
}}}
i am not sure if #10835 is related.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12438#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list