summaryrefslogtreecommitdiff
path: root/prototypes/TCReduce.hs
diff options
context:
space:
mode:
Diffstat (limited to 'prototypes/TCReduce.hs')
-rw-r--r--prototypes/TCReduce.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/prototypes/TCReduce.hs b/prototypes/TCReduce.hs
index 269d4d0f..e74b58e0 100644
--- a/prototypes/TCReduce.hs
+++ b/prototypes/TCReduce.hs
@@ -564,7 +564,6 @@ evv = \case
564 Snd -> \(_, x) -> x 564 Snd -> \(_, x) -> x
565 NY (evv1 -> a) Fst -> \(x, _) -> a x 565 NY (evv1 -> a) Fst -> \(x, _) -> a x
566 566
567 Skip (Init (T2 Snd)) -> \a0 a1 -> a1
568 Skip (Init (T2 (evv -> x))) -> \a0 a1 -> x ((), a1) 567 Skip (Init (T2 (evv -> x))) -> \a0 a1 -> x ((), a1)
569 Skip Id -> \_ x -> x 568 Skip Id -> \_ x -> x
570 Skip (evv -> x) -> \_ -> x 569 Skip (evv -> x) -> \_ -> x
@@ -661,6 +660,9 @@ Id `ny` x = x
661x `ny` Id = x 660x `ny` Id = x
662x `ny` y = NY x y 661x `ny` y = NY x y
663 662
663init' (T2 Snd) = Id
664init' x = Init x
665
664-------------------------------------------------------------------------------- 666--------------------------------------------------------------------------------
665 667
666uGV :: GV a -> GV b 668uGV :: GV a -> GV b
@@ -703,7 +705,7 @@ evva_ ss = \case
703 z@(getLams -> Just (i, x)) 705 z@(getLams -> Just (i, x))
704 | b -> Skip $ case i of 706 | b -> Skip $ case i of
705 False -> uGV evva'x 707 False -> uGV evva'x
706 True -> uGV $ Init $ T2 $ uGV evva'x 708 True -> uGV $ init' $ T2 $ uGV evva'x
707 | otherwise -> case i of 709 | otherwise -> case i of
708 False -> uGV $ SkipYN $ uGV evva'x 710 False -> uGV $ SkipYN $ uGV evva'x
709 True -> uGV $ T2 $ uGV evva'x 711 True -> uGV $ T2 $ uGV evva'x
@@ -742,8 +744,8 @@ evval ((x, _), ty) = (uGV y, tr ty $ evv y)
742 y = init' $ uGV $ evva_ [] x 744 y = init' $ uGV $ evva_ [] x
743 tr (VCon (TConName Int _ _ _ _ _) _) x = VInt (unsafeCoerce x :: Int) 745 tr (VCon (TConName Int _ _ _ _ _) _) x = VInt (unsafeCoerce x :: Int)
744 746
745init' :: GV (() -> b) -> GV b 747 init' :: GV (() -> b) -> GV b
746init' (Skip x) = x 748 init' (Skip x) = x
747 749
748-------------------------------------------------------------------------------- interpreter 750-------------------------------------------------------------------------------- interpreter
749 751