[GHC] #14860: QuantifiedConstraints: Can't quantify constraint involving type family
GHC
ghc-devs at haskell.org
Mon Apr 2 15:42:06 UTC 2018
#14860: QuantifiedConstraints: Can't quantify constraint involving type family
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.5
checker) | Keywords:
Resolution: wontfix | QuantifiedConstraints wipT2893
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
Replying to [comment:11 RyanGlScott]: I don't think you need quantified
constraints (the ticket:14822#comment:3 trick does works to solve my
previous comment), how about this:
{{{#!hs
instance Typeable f => Show (ExTyFam f) where
show (MkExTyFam x)
| Just HRefl <- typeRep @f `eqTypeRep` typeRep @(Proxy :: Type ->
Type)
= show x
| otherwise
= ..
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14860#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list