Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-new-flavor
http://hackage.haskell.org/trac/ghc/changeset/d29e2776b2e2e061ddee822d82500eaeed234cb3 >--------------------------------------------------------------- commit d29e2776b2e2e061ddee822d82500eaeed234cb3 Author: Dimitrios.Vytiniotis <[email protected]> Date: Tue Apr 3 11:59:51 2012 +0100 Bugfix in emitKindConstraint (must not cache orig constraint as Solved!); added short note to document an example. >--------------------------------------------------------------- compiler/typecheck/TcCanonical.lhs | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs index 3ea27b2..6bb6e99 100644 --- a/compiler/typecheck/TcCanonical.lhs +++ b/compiler/typecheck/TcCanonical.lhs @@ -884,7 +884,13 @@ emitKindConstraint ct xcomp _ = panic "emit_kind_constraint:can't happen" xdecomp x = [mkEvKindCast x (mkTcCoVarCo kev)] xev = XEvTerm xcomp xdecomp - in xCtFlavor fl [mkTcEqPred ty1 ty2] xev what_next } + in xCtFlavor_cache False fl [mkTcEqPred ty1 ty2] xev what_next } + -- Important: Do not cache original as Solved since we are supposed to + -- solve /exactly/ the same constraint later! Example: + -- (alpha :: kappa0) + -- (T :: *) + -- Equality is: (alpha ~ T), so we will emitConstraint (kappa0 ~ *) but + -- we don't want to say that (alpha ~ T) is now Solved! where what_next [new_fl] = continueWith (ct { cc_flavor = new_fl }) what_next _ = return Stop _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
