summaryrefslogtreecommitdiff
path: root/src/Compile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compile.hs')
-rw-r--r--src/Compile.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Compile.hs b/src/Compile.hs
index 424b28d..5c9d1a2 100644
--- a/src/Compile.hs
+++ b/src/Compile.hs
@@ -755,12 +755,10 @@ compile' env = \case
emit $ SVarDecl True (repSTy t2) name2 e2'
compile' (Const name2 `SCons` Const name1 `SCons` SNil) earg
- EWith _ e1 e2 -> do
- let t = typeOf e1
-
+ EWith _ t e1 e2 -> do
e1' <- compile' env e1
name1 <- genName
- emit $ SVarDecl True (repSTy t) name1 e1'
+ emit $ SVarDecl True (repSTy (typeOf e1)) name1 e1'
mcopy <- copyForWriting t name1
accname <- genName' "accum"