diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/compiler.lux | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/stdlib/source/lux/compiler.lux b/stdlib/source/lux/compiler.lux index 437389717..feade4a8c 100644 --- a/stdlib/source/lux/compiler.lux +++ b/stdlib/source/lux/compiler.lux @@ -532,6 +532,18 @@ _ (fail ($_ Text/append "Unknown tag: " (Ident/encode tag)))))) +(def: #export (tag-lists module) + (-> Text (Lux (List [(List Ident) Type]))) + (do Monad<Lux> + [=module (find-module module) + this-module-name current-module-name] + (wrap (|> (get@ #;types =module) + (list;filter (lambda [[type-name [tag-list exported? type]]] + (or exported? + (Text/= this-module-name module)))) + (List/map (lambda [[type-name [tag-list exported? type]]] + [tag-list type])))))) + (def: #export locals (Lux (List (List [Text Type]))) (lambda [state] |