diff options
author | Eduardo Julian | 2021-09-05 22:52:26 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-05 22:52:26 -0400 |
commit | 132ffdae1add622c8a3c6065d7730a8fe8ea5e78 (patch) | |
tree | 540310f190007d192b892db2d0a520d17b73ad48 /stdlib/source/library/lux/data | |
parent | 09e2747bf8c6dcdc1d7318f2490f0de37d77b39f (diff) |
Changed the syntax of do/be's (co)monad bindings.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/data/collection/list.lux | 2 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/json.lux | 6 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/tar.lux | 8 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/text/regex.lux | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux index ce9b246bd..b4aa38cf7 100644 --- a/stdlib/source/library/lux/data/collection/list.lux +++ b/stdlib/source/library/lux/data/collection/list.lux @@ -569,7 +569,7 @@ (|>> (\ ..monad in) (\ monad in))) (def: (conjoint MlMla) - (do {! monad} + (do [! monad] [lMla MlMla ... TODO: Remove this version ASAP and use one below. lla (for {@.old diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 5c27a69af..5a261ecde 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -85,7 +85,7 @@ (in (list (` (: JSON (#..Array ((~! row) (~+ (list\each wrapper members)))))))) [_ (#.Record pairs)] - (do {! ..monad} + (do [! ..monad] [pairs' (monad.each ! (function (_ [slot value]) (case slot @@ -316,7 +316,7 @@ (def: number_parser (Parser Number) - (do {! <>.monad} + (do [! <>.monad] [signed? (<>.parses? (<text>.this "-")) digits (<text>.many <text>.decimal) decimals (<>.else "0" @@ -358,7 +358,7 @@ (Parser String) (<| (<text>.enclosed [text.double_quote text.double_quote]) (loop [_ []]) - (do {! <>.monad} + (do [! <>.monad] [chars (<text>.some (<text>.none_of (text\composite "\" text.double_quote))) stop <text>.next]) (if (text\= "\" stop) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index e8335ce9d..cbe8c38ea 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -137,7 +137,7 @@ digits (<>.lifted (\ utf8.codec decoded digits)) _ ..small_suffix] (<>.lifted - (do {! try.monad} + (do [! try.monad] [value (\ n.octal decoded digits)] (..small value))))) @@ -151,7 +151,7 @@ (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end)))] (<>.lifted - (do {! try.monad} + (do [! try.monad] [value (\ n.octal decoded digits)] (..big value))))) @@ -291,7 +291,7 @@ _ (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end))] (<>.lifted - (do {! try.monad} + (do [! try.monad] [ascii (..un_padded string) text (\ utf8.codec decoded ascii)] (<in> text))))) @@ -520,7 +520,7 @@ (def: mode_parser (Parser Mode) - (do {! <>.monad} + (do [! <>.monad] [value (\ ! each ..from_small ..small_parser)] (if (n.> (:representation ..maximum_mode) value) diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index 4b4339ebc..5fa4e399d 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -84,7 +84,7 @@ (def: re_range^ (Parser Code) - (do {! <>.monad} + (do [! <>.monad] [from (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted))) _ (<text>.this "-") to (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted)))] @@ -236,7 +236,7 @@ (def: (re_counted_quantified^ current_module) (-> Text (Parser Code)) - (do {! <>.monad} + (do [! <>.monad] [base (re_simple^ current_module)] (<| (<text>.enclosed ["{" "}"]) ($_ <>.either |