[GHC] #15359: Quantified constraints do not work with equality constraints
GHC
ghc-devs at haskell.org
Thu Jul 12 07:23:47 UTC 2018
#15359: Quantified constraints do not work with equality constraints
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.5
Resolution: | Keywords:
| QuantifiedConstraints
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
> Redundant in what sense?
Well, can you show me a quantified constraint with an equality in the head
that is not useless?
For example what about this (by analogy with `Coercible`)
{{{
f :: forall m.
(forall a b. a ~ b => m a ~ m b)
=> blah
}}}
No, that redundant. If we have `[W] t1 a ~ t2 b` there is a built-in rule
to decompose it to `[W] t1 ~ t2` and `[W] a ~ b`. (There is no such rule
in general for `Coercible` which is why we need to allow it.) So that
quantified constraint wasn't useful.
Can you think of one that is? I can't.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15359#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list