From bc36487224f670c23002cc4575c0dba3e5dc1be1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 15 Mar 2022 07:24:35 -0400 Subject: De-sigil-ification: ^ --- stdlib/source/documentation/lux.lux | 40 +++++++++++----------- .../documentation/lux/control/security/policy.lux | 22 ++++++------ .../documentation/lux/data/collection/stream.lux | 36 +++++++++---------- .../source/documentation/lux/data/text/regex.lux | 30 ++++++++-------- 4 files changed, 64 insertions(+), 64 deletions(-) (limited to 'stdlib/source/documentation') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index efa13a913..bbefd85a6 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -358,12 +358,12 @@ _ {#None})]) -(documentation: /.^ +(documentation: /.pattern (format "Macro-expanding patterns." \n "It's a special macro meant to be used with 'case'.") [(case (: (List Int) (list +1 +2 +3)) - (^ (list x y z)) + (pattern (list x y z)) {#Some ($_ * x y z)} _ @@ -433,8 +433,8 @@ [(macro: .public (symbol tokens) (case tokens (^template [] - [(^ (list [_ { [module name]}])) - (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) + [(pattern (list [_ { [module name]}])) + (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) ([#Symbol]) _ @@ -529,12 +529,12 @@ (format "Character used to separate the parts of module names." \n "Value: " (%.text /.module_separator))) -(documentation: /.^open +(documentation: /.open (format "Same as the 'open' macro, but meant to be used as a pattern-matching macro for generating local bindings." \n "Takes an 'alias' text for the generated local bindings.") [(def: .public (range enum from to) (All (_ a) (-> (Enum a) a a (List a))) - (let [(^open "[0]") enum] + (let [(open "[0]") enum] (loop [end to output {.#End}] (cond (< end from) @@ -642,23 +642,23 @@ {.#Primitive name (list#each (reduced env) params)} (^template [] - [{ left right} - { (reduced env left) (reduced env right)}]) + [{ left right} + { (reduced env left) (reduced env right)}]) ([.#Sum] [.#Product]) (^template [] - [{ left right} - { (reduced env left) (reduced env right)}]) + [{ left right} + { (reduced env left) (reduced env right)}]) ([.#Function] [.#Apply]) (^template [] - [{ old_env def} - (case old_env - {.#End} - { env def} + [{ old_env def} + (case old_env + {.#End} + { env def} - _ - type)]) + _ + type)]) ([.#UnivQ] [.#ExQ]) {.#Parameter idx} @@ -727,13 +727,13 @@ [(def: my_nat 123) (def: my_text "456") (and (case [my_nat my_text] - (^ (static [..my_nat ..my_text])) + (pattern (static [..my_nat ..my_text])) true _ false) (case [my_nat my_text] - (^ [(static ..my_nat) (static ..my_text)]) + (pattern [(static ..my_nat) (static ..my_text)]) true _ @@ -959,7 +959,7 @@ ..Rec ..exec ..case - ..^ + ..pattern ..^or ..let ..function @@ -979,7 +979,7 @@ ..int ..rev ..module_separator - ..^open + ..open ..cond ..the ..open: diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux index bf9e6cb61..9bb54bef8 100644 --- a/stdlib/source/documentation/lux/control/security/policy.lux +++ b/stdlib/source/documentation/lux/control/security/policy.lux @@ -1,14 +1,14 @@ (.using - [library - [lux "*" - ["$" documentation {"+" documentation:}] - [data - [text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["$" documentation {"+" documentation:}] + [data + [text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Policy brand value %) "A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.") @@ -48,7 +48,7 @@ (Ex (_ %) (-> Any (Policy %))) (with_policy (: (Context Privacy Policy) - (function (_ (^open "%::.")) + (function (_ (open "%::.")) (implementation (def: (password value) (%::can_upgrade value)) diff --git a/stdlib/source/documentation/lux/data/collection/stream.lux b/stdlib/source/documentation/lux/data/collection/stream.lux index 6961530c6..4d3e89a52 100644 --- a/stdlib/source/documentation/lux/data/collection/stream.lux +++ b/stdlib/source/documentation/lux/data/collection/stream.lux @@ -1,19 +1,19 @@ (.using - [library - [lux {"-" list} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - [syntax {"+" syntax:}] - ["[0]" code] - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" list} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + [syntax {"+" syntax:}] + ["[0]" code] + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Stream it) "An infinite sequence of values.") @@ -44,10 +44,10 @@ \n "The right side contains all entries for which the predicate is #0.") [(partition left? xs)]) -(documentation: /.^stream& +(documentation: /.pattern (format "Allows destructuring of streams in pattern-matching expressions." \n "Caveat emptor: Only use it for destructuring, and not for testing values within the streams.") - [(let [(^stream& x y z _tail) (some_stream_func +1 +2 +3)] + [(let [(pattern x y z _tail) (some_stream_func +1 +2 +3)] (func x y z))]) (.def: .public documentation @@ -62,7 +62,7 @@ ..only ..partition - ..^stream& + ..pattern ($.default /.head) ($.default /.tail) ($.default /.functor) diff --git a/stdlib/source/documentation/lux/data/text/regex.lux b/stdlib/source/documentation/lux/data/text/regex.lux index 2b8bedfbc..631195a86 100644 --- a/stdlib/source/documentation/lux/data/text/regex.lux +++ b/stdlib/source/documentation/lux/data/text/regex.lux @@ -1,14 +1,14 @@ (.using - [library - [lux "*" - ["$" documentation {"+" documentation:}] - [data - [text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["$" documentation {"+" documentation:}] + [data + [text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.regex "Create lexers using regular-expression syntax." @@ -56,14 +56,14 @@ (regex "a|b") (regex "a(.)(.)|b(.)(.)")]) -(documentation: /.^regex +(documentation: /.pattern "Allows you to test text against regular expressions." [(case some_text - (^regex "(\d{3})-(\d{3})-(\d{4})" - [_ country_code area_code place_code]) + (pattern "(\d{3})-(\d{3})-(\d{4})" + [_ country_code area_code place_code]) do_some_thing_when_number - (^regex "\w+") + (pattern "\w+") do_some_thing_when_word _ @@ -74,6 +74,6 @@ ($.module /._ "" [..regex - ..^regex + ..pattern ($.default /.incorrect_quantification)] [])) -- cgit v1.2.3