aboutsummaryrefslogtreecommitdiff
path: root/src/lux/analyser.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/lux/analyser.clj')
-rw-r--r--src/lux/analyser.clj13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lux/analyser.clj b/src/lux/analyser.clj
index c5993ce83..d6cc5cfda 100644
--- a/src/lux/analyser.clj
+++ b/src/lux/analyser.clj
@@ -196,9 +196,12 @@
=output-type (&type/clean ?var ?output-type)]
(return (&&/|meta =output-type ?output-cursor ?output-term))))
-(defn repl-analyse [eval! compile-module compilers]
+(defn repl-analyse [optimize eval! compile-module compilers]
(|do [asts &parser/parse]
- (&type/with-var
- (fn [?var]
- (|do [outputs (&/flat-map% (partial analyse-ast eval! compile-module compilers ?var) asts)]
- (&/map% (partial clean-output ?var) outputs))))))
+ (&/flat-map% (fn [ast]
+ (&type/with-var
+ (fn [?var]
+ (|do [=outputs (&/with-closure
+ (analyse-ast optimize eval! compile-module compilers ?var ast))]
+ (&/map% (partial clean-output ?var) =outputs)))))
+ asts)))