diff options
author | Eduardo Julian | 2015-05-10 15:04:36 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-05-10 15:04:36 -0400 |
commit | 8dc736e2a383fe964d63dda6b885d41cabc6261c (patch) | |
tree | 8e4d9ddf503bbcd53023073dd8cfa4e824b85ab2 /src/lux/analyser/module.clj | |
parent | ab7b946a980475cad1e58186ac8c929c7659f529 (diff) |
- Switched to the new prefix convention for both lux's special forms and the host's.
- Made a few optimizations to speed-up the now slowed-down compiler.
Diffstat (limited to 'src/lux/analyser/module.clj')
-rw-r--r-- | src/lux/analyser/module.clj | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lux/analyser/module.clj b/src/lux/analyser/module.clj index 5960d3080..f36dc044a 100644 --- a/src/lux/analyser/module.clj +++ b/src/lux/analyser/module.clj @@ -71,8 +71,8 @@ (if (or exported? (= current-module module)) (matchv ::M/objects [$$def] [["lux;AliasD" [?r-module ?r-name]]] - (&/run-state (find-def ?r-module ?r-name) - state) + ((find-def ?r-module ?r-name) + state) [_] (return* state (&/T (&/T module name) $$def))) @@ -94,19 +94,19 @@ (if-let [$def (&/|get name $module)] (matchv ::M/objects [$def] [[exported? ["lux;ValueD" ?type]]] - (&/run-state (|do [_ (&type/check &type/Macro ?type) - ^ClassLoader loader &/loader - :let [macro (-> (.loadClass loader (&host/location (&/|list module name))) - (.getField "_datum") - (.get nil))]] - (fn [state*] - (return* (&/update$ &/$MODULES - (fn [$modules] - (&/|put module (&/|put name (&/T exported? (&/V "lux;MacroD" macro)) $module) - $modules)) - state*) - nil))) - state) + ((|do [_ (&type/check &type/Macro ?type) + ^ClassLoader loader &/loader + :let [macro (-> (.loadClass loader (&host/location (&/|list module name))) + (.getField "_datum") + (.get nil))]] + (fn [state*] + (return* (&/update$ &/$MODULES + (fn [$modules] + (&/|put module (&/|put name (&/T exported? (&/V "lux;MacroD" macro)) $module) + $modules)) + state*) + nil))) + state) [[_ ["lux;MacroD" _]]] (fail* (str "[Analyser Error] Can't re-declare a macro: " (str module &/+name-separator+ name))) |