Commit 1ddce518 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

makeSolvedByInst is only called on wanteds

This patch just adds an assert error.
parent 1e8493b3
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment