From ad944131001134a29d31d61046e29d70793c782f Mon Sep 17 00:00:00 2001 From: crumbtoo Date: Tue, 14 Nov 2023 20:35:38 -0700 Subject: [PATCH] be less eager in conditional primitives not quite sure what i was thinking earlier. in `if# c t f`, there is no reason for `t` or `f` to be strict under any circumstance. --- src/TIM.hs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/TIM.hs b/src/TIM.hs index a3049f1..277da36 100644 --- a/src/TIM.hs +++ b/src/TIM.hs @@ -262,18 +262,12 @@ step st = primStep _ IfP (TiState s d h g sts) = TiState s' d' h' g sts where s' | needsEval cn = [c] - | isTrue, needsEval tn = [t] - | not isTrue, needsEval fn = [f] | otherwise = drop 3 s d' | needsEval cn = drop 1 s : d - | isTrue, needsEval tn = drop 2 s : d - | not isTrue, needsEval fn = drop 3 s : d | otherwise = d h' | needsEval cn = h - | isTrue, needsEval tn = h - | not isTrue, needsEval fn = h | otherwise = update h rootAddr (NInd $ if isTrue then t else f)