[GHC] #13992: Error message, room for improvement (polykinds)
GHC
ghc-devs at haskell.org
Tue Jul 18 20:10:45 UTC 2017
#13992: Error message, room for improvement (polykinds)
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: PolyKinds | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Something like
{{{#!hs
-- • No instance for (Show (Compose Proxy Proxy a))
-- arising from the 'deriving' clause of a data type declaration
-- Possible fix:
-- use a standalone 'deriving instance' declaration,
-- so you can specify the instance context yourself
-- • When deriving the instance for (Show (FlipProxy a))
{-# Language DerivingStrategies, GeneralizedNewtypeDeriving, PolyKinds,
KindSignatures #-}
import Data.Functor.Compose
import Data.Proxy
import Data.Kind
newtype FlipProxy a = FlipProxy_ (Compose Proxy Proxy a)
deriving newtype
Show
}}}
where the solution is to constraint the kind of `a :: Type`, it would be
nice if GHC could reference kind variables.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13992>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list