diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/meta.lux | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index 5cb1d3894..2b68b7e89 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -368,14 +368,20 @@ (def .public (export name) (-> Symbol (Meta Definition)) - (do ..monad - [definition (..definition name)] + (do [! ..monad] + [name (..normal name) + definition (..definition name)] (when definition {.#Definition definition} (let [[exported? def_type def_value] definition] (if exported? (in definition) - (failure (all text#composite "Definition is not an export: " (symbol#encoded name))))) + (do ! + [.let [[expected _] name] + actual ..current_module_name] + (if (text#= expected actual) + (in definition) + (failure (all text#composite "Definition is not an export: " (symbol#encoded name))))))) {.#Type [exported? type labels]} (if exported? |