@@ -712,6 +712,8 @@ substSC n repl (Case n' alts)
712 | n == n' = Case repl (map (substAlt n repl) alts)
712 | n == n' = Case repl (map (substAlt n repl) alts)
713 | otherwise = Case n' (map (substAlt n repl) alts)
713 | otherwise = Case n' (map (substAlt n repl) alts)
714substSC n repl (STerm t) = STerm $ subst n (P Bound repl Erased) t
714substSC n repl (STerm t) = STerm $ subst n (P Bound repl Erased) t
715+substSC n repl (UnmatchedCase errmsg) = UnmatchedCase errmsg
716+substSC n repl ImpossibleCase = ImpossibleCase
715substSC n repl sc = error $ "unsupported in substSC: " ++ show sc
717substSC n repl sc = error $ "unsupported in substSC: " ++ show sc
717substAlt :: Name -> Name -> CaseAlt -> CaseAlt
719substAlt :: Name -> Name -> CaseAlt -> CaseAlt