[GHC] #14860: QuantifiedConstraints: Can't quantify constraint involving type family
GHC
ghc-devs at haskell.org
Tue Feb 27 17:01:58 UTC 2018
#14860: QuantifiedConstraints: Can't quantify constraint involving type family
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.5
checker) | Keywords:
Resolution: | 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 simonpj):
But the error is at line 17, where we don't know `f` and cannot reduce
`Apply f a`. So we really do have a local instance
{{{
local instance forall a. Show (Apply f a)
}}}
You might argue that we should use it to solve `Show (Apply f Int)` or any
other instantiation, but we don't. Because we don't expect type functions
in instance heads.
(And BTW it's possible that `Show (Apply f Int)` might reduce to `Show
Bool` and we'd be stuck.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14860#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list