aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/meta.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/meta.lux23
1 files changed, 12 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index 5f6dad623..6b78550a3 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -16,6 +16,7 @@
[dictionary
["[0]" plist]]]]
[macro
+ ["^" pattern]
["[0]" code]]
[math
[number
@@ -136,7 +137,7 @@
(def: .public current_module
(Meta Module)
- (let [(^open "#[0]") ..monad]
+ (let [(open "#[0]") ..monad]
(|> ..current_module_name
(#each ..module)
#conjoint)))
@@ -243,7 +244,7 @@
(case (|> lux
(the [.#type_context .#var_bindings])
(type_variable var))
- (^or {.#None} {.#Some {.#Var _}})
+ (^.or {.#None} {.#Some {.#Var _}})
{try.#Success [lux type]}
{.#Some type'}
@@ -300,9 +301,9 @@
(function (_ lux)
(case (: (Maybe Global)
(do maybe.monad
- [(^open "[0]") (|> lux
- (the .#modules)
- (plist.value normal_module))]
+ [(open "[0]") (|> lux
+ (the .#modules)
+ (plist.value normal_module))]
(plist.value normal_short #definitions)))
{.#Some definition}
{try.#Success [lux definition]}
@@ -325,8 +326,8 @@
(the .#definitions)
(list.all (function (_ [def_name global])
(case global
- (^or {.#Definition [exported? _]}
- {.#Type [exported? _]})
+ (^.or {.#Definition [exported? _]}
+ {.#Type [exported? _]})
(if (and exported?
(text#= normal_short def_name))
{.#Some (symbol#encoded [module_name def_name])}
@@ -508,8 +509,8 @@
(case (plist.value name (the .#definitions module))
{.#Some {.#Type [exported? type labels]}}
(case labels
- (^or {.#Left labels}
- {.#Right labels})
+ (^.or {.#Left labels}
+ {.#Right labels})
(in {.#Some (list#each (|>> [module_name])
{.#Item labels})}))
@@ -534,13 +535,13 @@
(def: .public (imported_modules module_name)
(-> Text (Meta (List Text)))
(do ..monad
- [(^open "_[0]") (..module module_name)]
+ [(open "_[0]") (..module module_name)]
(in _#imports)))
(def: .public (imported_by? import module)
(-> Text Text (Meta Bit))
(do ..monad
- [(^open "_[0]") (..module module)]
+ [(open "_[0]") (..module module)]
(in (list.any? (text#= import) _#imports))))
(def: .public (imported? import)