From: simonpj@microsoft.com Date: Fri, 11 Feb 2011 17:34:15 +0000 (+0000) Subject: makeSolvedByInst is only called on wanteds X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1ddce51848468501577f36119920e9e32e93fba8;ds=sidebyside makeSolvedByInst is only called on wanteds This patch just adds an assert error. --- 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)