@@ -167,9 +167,15 @@ data Phase = CompileTime | RunTime
167167
168168simpleCase :: Bool -> Bool -> Phase -> FC -> [([Name], Term, Term)] ->
169169 TC CaseDef
170−simpleCase tc cover phase fc []
170+simpleCase tc cover phase fc cs
171+ = sc' tc cover phase fc (filter (\(_, _, r) ->
172+ case r of
173+ Impossible -> False
174+ _ -> True) cs)
175+ where
176+ sc' tc cover phase fc []
171177 = return $ CaseDef [] (UnmatchedCase "No pattern clauses") []
172−simpleCase tc cover phase fc cs
178+ sc' tc cover phase fc cs
173179 = let proj = phase == RunTime
174180 pats = map (\ (avs, l, r) ->
175181 (avs, toPats tc l, (l, r))) cs