@@ -352,10 +352,10 @@ instance ToIR SC where
353 ir' (STerm t) = ir t
353 ir' (STerm t) = ir t
354 ir' (UnmatchedCase str) = return $ LError str
354 ir' (UnmatchedCase str) = return $ LError str
355+ ir' (ProjCase tm alts) = do tm' <- ir tm
355− ir' (ProjCase tm alts) = do alts' <- mapM (mkIRAlt tm) alts
356+ alts' <- mapM (mkIRAlt tm') alts
357 return $ LCase tm' alts'
357 return $ LCase tm' alts'
358− ir' (Case n alts) = do alts' <- mapM (mkIRAlt (P Bound n Erased)) alts
358+ ir' (Case n alts) = do alts' <- mapM (mkIRAlt (LV (Glob n))) alts
359 return $ LCase (LV (Glob n)) alts'
359 return $ LCase (LV (Glob n)) alts'
360 ir' ImpossibleCase = return LNothing
360 ir' ImpossibleCase = return LNothing
@@ -379,10 +379,10 @@ instance ToIR SC where
379 | matchableTy x
379 | matchableTy x
380 = do rhs' <- ir rhs
380 = do rhs' <- ir rhs
381 return $ LDefaultCase rhs'
381 return $ LDefaultCase rhs'
382− mkIRAlt (P _ orig _) (SucCase n rhs)
382+ mkIRAlt tm (SucCase n rhs)
383 = do rhs' <- ir rhs
383 = do rhs' <- ir rhs
384 return $ LDefaultCase (LLet n (LOp (LMinus (ATInt ITBig))
384 return $ LDefaultCase (LLet n (LOp (LMinus (ATInt ITBig))
385− [LV (Glob orig),
385+ [tm,
386 LConst (BI 1)]) rhs')
386 LConst (BI 1)]) rhs')
387-- return $ LSucCase n rhs'
387-- return $ LSucCase n rhs'
388 mkIRAlt _ (ConstCase c rhs)
388 mkIRAlt _ (ConstCase c rhs)