[GHC] #13933: Support Typeable instances for types with coercions
GHC
ghc-devs at haskell.org
Fri Jul 7 18:42:14 UTC 2017
#13933: Support Typeable instances for types with coercions
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.3
Keywords: TypeInType, | Operating System: Unknown/Multiple
Typeable |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
If I say
{{{#!hs
{-# LANGUAGE GADTs, TypeApplications, TypeInType #-}
module Bug where
import Type.Reflection
data G a where
MkG :: a ~ Bool => G a
rep = typeRep @MkG
}}}
I get
{{{
Bug.hs:10:7: error:
• No instance for (Typeable <>) arising from a use of ‘typeRep’
• In the expression: typeRep @MkG
In an equation for ‘rep’: rep = typeRep @MkG
|
10 | rep = typeRep @MkG
|
}}}
First off, the error message is confusing, mentioning the mysterious `<>`.
But more importantly, it would be nice if the `Typeable` mechanism
supported coercions.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13933>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list