aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/meta
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/meta.lux14
-rw-r--r--stdlib/source/library/lux/meta/annotation.lux16
2 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index 728e969b8..5c7d102fe 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -214,7 +214,7 @@
#.None
#0)])))
-(def: (try_both f x1 x2)
+(def: (on_either f x1 x2)
(All [a b]
(-> (-> a (Maybe b)) a a (Maybe b)))
(case (f x1)
@@ -262,11 +262,11 @@
(list.any? test (: (List [Text [Type Any]])
(get@ [#.captured #.mappings] env)))))
(get@ #.scopes compiler))
- [_ [type _]] (try_both (list.find test)
- (: (List [Text [Type Any]])
- (get@ [#.locals #.mappings] scope))
- (: (List [Text [Type Any]])
- (get@ [#.captured #.mappings] scope)))]
+ [_ [type _]] (on_either (list.find test)
+ (: (List [Text [Type Any]])
+ (get@ [#.locals #.mappings] scope))
+ (: (List [Text [Type Any]])
+ (get@ [#.captured #.mappings] scope)))]
(in type))
(#.Some var_type)
((clean_type var_type) compiler)
@@ -291,7 +291,7 @@
(#try.Success [compiler definition])
_
- (let [current_module (|> compiler (get@ #.current_module) (maybe.default "???"))
+ (let [current_module (|> compiler (get@ #.current_module) (maybe.else "???"))
separator ($_ text\compose text.new_line " ")]
(#try.Failure ($_ text\compose
"Unknown definition: " (name\encode name) text.new_line
diff --git a/stdlib/source/library/lux/meta/annotation.lux b/stdlib/source/library/lux/meta/annotation.lux
index 27512d5f6..a9892473f 100644
--- a/stdlib/source/library/lux/meta/annotation.lux
+++ b/stdlib/source/library/lux/meta/annotation.lux
@@ -61,7 +61,7 @@
(def: #export (flagged? flag)
(-> Name Annotation Bit)
- (|>> (..bit flag) (maybe.default false)))
+ (|>> (..bit flag) (maybe.else false)))
(template [<name> <tag>]
[(def: #export <name>
@@ -69,7 +69,7 @@
(..flagged? (name_of <tag>)))]
[implementation? #.implementation?]
- [recursive_type? #.type-rec?]
+ [recursive_type? #.type_rec?]
[signature? #.sig?]
)
@@ -85,11 +85,11 @@
(template [<name> <tag>]
[(def: #export (<name> ann)
(-> Annotation (List Text))
- (maybe.default (list)
- (do {! maybe.monad}
- [args (..tuple (name_of <tag>) ann)]
- (monad.map ! ..text_parser args))))]
+ (<| (maybe.else (list))
+ (do {! maybe.monad}
+ [args (..tuple (name_of <tag>) ann)]
+ (monad.map ! ..text_parser args))))]
- [function_arguments #.func-args]
- [type_arguments #.type-args]
+ [function_arguments #.func_args]
+ [type_arguments #.type_args]
)