summaryrefslogtreecommitdiff
path: root/Compiler.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Compiler.hs')
-rw-r--r--Compiler.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Compiler.hs b/Compiler.hs
index b221694..922528c 100644
--- a/Compiler.hs
+++ b/Compiler.hs
@@ -75,8 +75,9 @@ analyseValue = go (Map.empty, 0)
VQuoted value -> TVQuoted value
VDefine name value -> TVDefine name (go env value)
VLambda args body ->
- let t = go (foldr (flip Map.insert depth) envd args, depth + 1) body
- in TVLambda args t (Set.toList (collectEscapes depth t))
+ let depth' = depth + 1
+ t = go (foldr (flip Map.insert depth') envd args, depth') body
+ in TVLambda args t (Set.toList (collectEscapes depth' t))
VLet ((name, value) : args) body ->
TVLet (name, go (envd, depth) value)
(go (Map.insert name depth envd, depth) (VLet args body))