diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux.lux | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 3cf71545b..86a1cdce7 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -4079,22 +4079,6 @@ (~+ localizations) (~+ openings))))) -(macro: .public (using _imports) - (do meta_monad - [current_module current_module_name - imports (imports_parser #0 current_module {#End} _imports) - .let [=imports (|> imports - (list#each (: (-> Importation Code) - (function (_ [module_name m_alias =refer]) - (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))])))) - tuple$) - =refers (list#each (: (-> Importation Code) - (function (_ [module_name m_alias =refer]) - (refer_code module_name m_alias =refer))) - imports) - =module (` ("lux def module" (~ =imports)))]] - (in {#Item =module =refers}))) - (macro: .public (# tokens) (case tokens (^ (list struct [_ {#Symbol member}])) @@ -4823,6 +4807,31 @@ _ (failure (..wrong_syntax_error (symbol ..for)))))) +(macro: .public (using _imports) + (do meta_monad + [current_module current_module_name + imports (imports_parser #0 current_module {#End} _imports) + .let [=imports (|> imports + (list#each (: (-> Importation Code) + (function (_ [module_name m_alias =refer]) + (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))])))) + tuple$) + =refers (list#each (: (-> Importation Code) + (function (_ [module_name m_alias =refer]) + (refer_code module_name m_alias =refer))) + imports) + =module (` ("lux def module" (~ =imports)))] + g!_ (..generated_symbol "")] + (in {#Item =module + (for [... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. + ... Without it, I get this strange error + ... {library/lux/tool/compiler/language/lux/generation.no_buffer_for_saving_code} + ... Artifact ID: 0 + ... Which only ever happens for the Python compiler. + "Python" (list& (` ("lux def" (~ g!_) [] #0)) + =refers)] + =refers)}))) + (def: (embedded_expansions code) (-> Code (Meta [(List [Code Code]) Code])) (case code @@ -4977,7 +4986,9 @@ (def: (methodP tokens) (-> (List Code) (Maybe [(List Code) [Text Code]])) (case tokens - (^ (list& [_ {#Form (list [_ {#Text "lux type check"}] type [_ {#Symbol ["" name]}])}] + (^ (list& [_ {#Form (list [_ {#Text "lux type check"}] + type + [_ {#Symbol ["" name]}])}] tokens')) {#Some [tokens' [name type]]} |