[commit: ghc] master: Solve irreducible evidence from itself (a7ac381)
Max Bolingbroke
batterseapower at hotmail.com
Mon Sep 12 13:40:13 CEST 2011
On 12 September 2011 12:16, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
> What is going on here?! Pls describe
It's totally analogous to the Class/Class rule that solves a class
constraint from an identical one, so I didn't think it needed an
explanation! I also added test tc257 which this change fixes.
The problem was that it is possible to have a Given (ctxt a ::
Constraint) and a Wanted (ctxt a :: Constraint). Clearly we should
just satisfy the Wanted with that Given. Without the irred/irred rule
this will not happen.
Of course, this rule is only useful in the situation where we cannot
refine ctxt further. If we actually discover what ctxt is instantiated
the irreducible constraint may become reducible again and then the
class/class and ip/ip rules will make things work.
Make sense?
Max
More information about the Cvs-ghc
mailing list