From 8b158ecbd330dce3603ba5e854fb21ca482c0b64 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Jan 2017 21:39:30 -0400 Subject: - Fixed some bugs in the REPL. --- luxc/src/lux/repl.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'luxc/src/lux/repl.clj') diff --git a/luxc/src/lux/repl.clj b/luxc/src/lux/repl.clj index 195f3dc3e..1c727f246 100644 --- a/luxc/src/lux/repl.clj +++ b/luxc/src/lux/repl.clj @@ -24,14 +24,14 @@ (defn ^:private repl-cursor [repl-line] (&/T [repl-module repl-line 0])) -(defn ^:private init [source-dirs] - (do (&compiler/init!) +(defn ^:private init [resources-dirs source-dirs target-dir] + (do (&compiler/init! resources-dirs target-dir) (|case ((|do [_ (&compiler/compile-module source-dirs "lux") _ (&cache/delete repl-module) _ (&module/create-module repl-module 0) _ (fn [?state] (return* (&/set$ &/$source - (&/|list (&/T [(repl-cursor -1) "(;import lux)"])) + (&/|list (&/T [(repl-cursor -1) "(;module: lux)"])) ?state) nil)) analysed-tokens (&analyser/repl-analyse &optimizer/optimize &compiler/eval! (partial &compiler/compile-module source-dirs) &compiler/all-compilers) @@ -50,9 +50,9 @@ )) ;; [Values] -(defn repl [source-dirs] +(defn repl [resources-dirs source-dirs target-dir] (with-open [input (->> System/in (new InputStreamReader) (new BufferedReader))] - (loop [state (init source-dirs) + (loop [state (init resources-dirs source-dirs target-dir) repl-line 0 multi-line? false] (let [_ (if (not multi-line?) -- cgit v1.2.3