projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
makeSolvedByInst is only called on wanteds
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcSMonad.lhs
diff --git
a/compiler/typecheck/TcSMonad.lhs
b/compiler/typecheck/TcSMonad.lhs
index
36befd9
..
27ecb44
100644
(file)
--- 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 -> 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)
deCanonicalise :: CanonicalCt -> FlavoredEvVar
deCanonicalise ct = mkEvVarX (cc_id ct) (cc_flavor ct)