diff options
author | Eduardo Julian | 2018-07-20 22:46:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-20 22:46:38 -0400 |
commit | 518a7467c4e0ef904afa8c59cff3594d6f63c552 (patch) | |
tree | 509598d219a780d14a8fe6ccd46545f701a1cd17 /stdlib/source/lux.lux | |
parent | b1315d6dc1e4bed4a3bf35e8c6f67d88c2aa7b55 (diff) |
No longer giving default aliases to un-prefixed imports.
Diffstat (limited to 'stdlib/source/lux.lux')
-rw-r--r-- | stdlib/source/lux.lux | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 226545576..392d3a504 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -4220,15 +4220,7 @@ #import-refer {#refer-defs #All #refer-open (list)}}))) - (^ [_ (#Tuple (list [_ (#Symbol ["" m-name])]))]) - (do Monad<Meta> - [import-name (clean-module nested? relative-root m-name)] - (wrap (list {#import-name import-name - #import-alias (#Some m-name) - #import-refer {#refer-defs #Nothing - #refer-open (list)}}))) - - (^ [_ (#Tuple (list& [_ (#Text alias)] [_ (#Symbol ["" m-name])] extra))]) + (^ [_ (#Tuple (list& [_ (#Symbol ["" m-name])] extra))]) (do Monad<Meta> [import-name (clean-module nested? relative-root m-name) referral+extra (parse-referrals extra) @@ -4236,13 +4228,15 @@ openings+extra (parse-openings extra) #let [[openings extra] openings+extra] sub-imports (parse-imports #1 import-name extra)] - (wrap (list& {#import-name import-name - #import-alias (#Some (replace-all "." m-name alias)) - #import-refer {#refer-defs referral - #refer-open openings}} - sub-imports))) + (wrap (case [referral openings] + [#Nothing #Nil] sub-imports + _ (list& {#import-name import-name + #import-alias #None + #import-refer {#refer-defs referral + #refer-open openings}} + sub-imports)))) - (^ [_ (#Tuple (list& [_ (#Symbol ["" m-name])] extra))]) + (^ [_ (#Tuple (list& [_ (#Text alias)] [_ (#Symbol ["" m-name])] extra))]) (do Monad<Meta> [import-name (clean-module nested? relative-root m-name) referral+extra (parse-referrals extra) @@ -4250,13 +4244,11 @@ openings+extra (parse-openings extra) #let [[openings extra] openings+extra] sub-imports (parse-imports #1 import-name extra)] - (wrap (case [referral openings] - [#Nothing #Nil] sub-imports - _ (list& {#import-name import-name - #import-alias (#Some m-name) - #import-refer {#refer-defs referral - #refer-open openings}} - sub-imports)))) + (wrap (list& {#import-name import-name + #import-alias (#Some (replace-all "." m-name alias)) + #import-refer {#refer-defs referral + #refer-open openings}} + sub-imports))) _ (do Monad<Meta> |