On 12 September 2011 12:16, Simon Peyton-Jones <[email protected]> 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

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to