aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lux/optimizer.clj13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lux/optimizer.clj b/src/lux/optimizer.clj
index 6adfca501..e774f4216 100644
--- a/src/lux/optimizer.clj
+++ b/src/lux/optimizer.clj
@@ -67,10 +67,6 @@
($tuple elems)
(&/T [meta ($tuple (&/|map (partial shift-function-body own-body?) elems))])
- ($apply func args)
- (&/T [meta ($apply (shift-function-body own-body? func)
- (&/|map (partial shift-function-body own-body?) args))])
-
($case value branches)
(&/T [meta ($case (shift-function-body own-body? value)
(&/|map (fn [branch]
@@ -108,6 +104,15 @@
(&/$Global ?module ?name)
body)
body)
+
+ ($apply [meta-0 ($var (&/$Local 0))] args)
+ (&/T [meta ($apply (&/T [meta-0 ($var (&/$Local 0))])
+ (&/$Cons (&/T [meta-0 ($var (&/$Local 1))])
+ (&/|map (partial shift-function-body own-body?) args)))])
+
+ ($apply func args)
+ (&/T [meta ($apply (shift-function-body own-body? func)
+ (&/|map (partial shift-function-body own-body?) args))])
($captured scope idx source)
(if own-body?