aboutsummaryrefslogtreecommitdiff
path: root/src/AST/SplitLets.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-10-30 15:58:08 +0100
committerTom Smeding <tom@tomsmeding.com>2025-10-30 15:58:08 +0100
commit4c9ae47dd5bbd27b1acb6dc5d4a55657ac1f026f (patch)
treee371c4962f1beee96cc68d55accffab16e18b97a /src/AST/SplitLets.hs
parent4d456e4d34b1e4fb3725051d1b8a0c376b704692 (diff)
Simplify foldD2 to not sum x0 contributions
Diffstat (limited to 'src/AST/SplitLets.hs')
-rw-r--r--src/AST/SplitLets.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AST/SplitLets.hs b/src/AST/SplitLets.hs
index 73c1c67..d276e44 100644
--- a/src/AST/SplitLets.hs
+++ b/src/AST/SplitLets.hs
@@ -38,10 +38,10 @@ splitLets' = \sub -> \case
EFold1InnerD1 x cm a b c ->
let STArr _ t1 = typeOf c
in EFold1InnerD1 x cm (split2 sub t1 t1 a) (splitLets' sub b) (splitLets' sub c)
- EFold1InnerD2 x cm a b c d e ->
- let t2 = typeOf b
- STArr _ tB = typeOf d
- in EFold1InnerD2 x cm (split2 sub tB t2 a) (splitLets' sub b) (split2 sub t2 t2 c) (splitLets' sub d) (splitLets' sub e)
+ EFold1InnerD2 x cm a b c ->
+ let STArr _ tB = typeOf b
+ STArr _ t2 = typeOf c
+ in EFold1InnerD2 x cm (split2 sub tB t2 a) (splitLets' sub b) (splitLets' sub c)
EPair x a b -> EPair x (splitLets' sub a) (splitLets' sub b)
EFst x e -> EFst x (splitLets' sub e)