diff options
author | Eduardo Julian | 2019-12-29 22:41:46 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-12-29 22:41:46 -0400 |
commit | 55219078698866155d7d3879f1378f75ba2ba3ee (patch) | |
tree | 47db4442c7063d2e234a4cc4f0f49d9792097af4 /stdlib/source/lux/tool/compiler/phase/directive.lux | |
parent | 84ea12c2960cc7460de81087a6e53bcc6d37a3d6 (diff) |
FIX the names of function classes are now prefixed with their originating module.
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/directive.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/directive.lux | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/directive.lux b/stdlib/source/lux/tool/compiler/phase/directive.lux index f79f2b586..dc4115610 100644 --- a/stdlib/source/lux/tool/compiler/phase/directive.lux +++ b/stdlib/source/lux/tool/compiler/phase/directive.lux @@ -36,12 +36,10 @@ (def: #export (phase expander) (-> Expander Phase) (let [analyze (analysisP.phase expander)] - (function (compile code) + (function (recur code) (case code (^ [_ (#.Form (list& [_ (#.Text name)] inputs))]) - (do //.monad - [requirements (//extension.apply compile [name inputs])] - (wrap requirements)) + (//extension.apply recur [name inputs]) (^ [_ (#.Form (list& macro inputs))]) (do //.monad @@ -58,22 +56,20 @@ (wrap macro) #.None - (//.throw macro-was-not-found macro-name))] + (//.throw ..macro-was-not-found macro-name))] (//extension.lift (//macro.expand expander macro-name macro inputs))) _ - (//.throw invalid-macro-call code)))) - requirements (case expansion - (^ (list& <lux_def_module> referrals)) - (do @ - [requirements (compile <lux_def_module>)] - (wrap (update@ #/.referrals (list;compose referrals) requirements))) + (//.throw ..invalid-macro-call code))))] + (case expansion + (^ (list& <lux_def_module> referrals)) + (|> (recur <lux_def_module>) + (:: @ map (update@ #/.referrals (list;compose referrals)))) - _ - (|> expansion - (monad.map @ compile) - (:: @ map (list;fold /.merge-requirements /.no-requirements))))] - (wrap requirements)) + _ + (|> expansion + (monad.map @ recur) + (:: @ map (list;fold /.merge-requirements /.no-requirements))))) _ - (//.throw not-a-directive code)))))) + (//.throw ..not-a-directive code)))))) |