Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/1ddce51848468501577f36119920e9e32e93fba8

>---------------------------------------------------------------

commit 1ddce51848468501577f36119920e9e32e93fba8
Author: [email protected] <unknown>
Date:   Fri Feb 11 17:34:15 2011 +0000

    makeSolvedByInst is only called on wanteds
    
    This patch just adds an assert error.

>---------------------------------------------------------------

 compiler/typecheck/TcSMonad.lhs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index 36befd9..27ecb44 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -186,8 +186,10 @@ makeSolvedByInst :: CanonicalCt -> CanonicalCt
 --       Wanted         -> Given
 --       Given, Derived -> no-op
 makeSolvedByInst ct 
-  | Wanted loc <- cc_flavor ct = ct { cc_flavor = mkGivenFlavor (Wanted loc) 
UnkSkol }
-  | otherwise                  = ct
+  | Wanted loc <- cc_flavor ct
+  = ct { cc_flavor = Given (setCtLocOrigin loc UnkSkol) }
+  | otherwise     -- Only called on wanteds
+  = pprPanic "makeSolvedByInst" (ppr ct)
 
 deCanonicalise :: CanonicalCt -> FlavoredEvVar
 deCanonicalise ct = mkEvVarX (cc_id ct) (cc_flavor ct)



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

Reply via email to