diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index e0717c88c..9d3ca2032 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -4850,9 +4850,10 @@ _ (fail "Wrong syntax for refer"))) -(def: (refer-to-code module-name [r-defs r-opens]) - (-> Text Refer Code) - (let [localizations (: (List Code) +(def: (refer-to-code module-name module-alias' [r-defs r-opens]) + (-> Text (Maybe Text) Refer Code) + (let [module-alias (..default module-name module-alias') + localizations (: (List Code) (case r-defs #All (list (' #*)) @@ -4866,7 +4867,8 @@ #Nothing (list))) openings (list/map (function (_ [alias structs]) - (form$ (list& (text$ alias) (list/map local-identifier$ structs)))) + (form$ (list& (text$ (..replace-all "#" module-alias alias)) + (list/map local-identifier$ structs)))) r-opens)] (` (..refer (~ (text$ module-name)) (~+ localizations) @@ -4906,7 +4908,7 @@ imports) =refers (list/map (: (-> Importation Code) (function (_ [m-name m-alias =refer]) - (refer-to-code m-name =refer))) + (refer-to-code m-name m-alias =refer))) imports) =meta (process-def-meta (list& [(` #.imports) (` [(~+ =imports)])] _meta)) |