diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/data/format/binary.lux | 12 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/css.lux | 20 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/css/value.lux | 4 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/tar.lux | 62 | ||||
-rw-r--r-- | stdlib/source/library/lux/data/format/xml.lux | 2 |
5 files changed, 50 insertions, 50 deletions
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux index e23ade3fb..7a6ccadba 100644 --- a/stdlib/source/library/lux/data/format/binary.lux +++ b/stdlib/source/library/lux/data/format/binary.lux @@ -93,12 +93,12 @@ (^template [<number> <tag> <writer>] [(<tag> caseV) (let [[caseS caseT] (<writer> caseV)] - [(.inc caseS) + [(.++ caseS) (function (_ [offset binary]) (|> binary (binary.write/8! offset <number>) try.trusted - [(.inc offset)] + [(.++ offset)] caseT))])]) ([0 #.Left left] [1 #.Right right]) @@ -243,12 +243,12 @@ (^template [<number> <tag> <writer>] [(<tag> caseV) (let [[caseS caseT] (<writer> caseV)] - [(.inc caseS) + [(.++ caseS) (function (_ [offset binary]) (|> binary (binary.write/8! offset <number>) try.trusted - [(.inc offset)] + [(.++ offset)] caseT))])]) ([0 #.Primitive (..and ..text (..list recur))] [1 #.Sum pair] @@ -278,12 +278,12 @@ (^template [<number> <tag> <writer>] [(<tag> caseV) (let [[caseS caseT] (<writer> caseV)] - [(.inc caseS) + [(.++ caseS) (function (_ [offset binary]) (|> binary (binary.write/8! offset <number>) try.trusted - [(.inc offset)] + [(.++ offset)] caseT))])]) ([0 #.Bit ..bit] [1 #.Nat ..nat] diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux index 7ec9a0d35..8b3a9270c 100644 --- a/stdlib/source/library/lux/data/format/css.lux +++ b/stdlib/source/library/lux/data/format/css.lux @@ -51,19 +51,19 @@ (def: .public (font font) (-> Font (CSS Special)) - (let [with_unicode (case (get@ #/font.unicode_range font) + (let [with_unicode (case (value@ #/font.unicode_range font) (#.Some unicode_range) - (let [unicode_range' (format "U+" (\ nat.hex encode (get@ #/font.start unicode_range)) - "-" (\ nat.hex encode (get@ #/font.end unicode_range)))] + (let [unicode_range' (format "U+" (\ nat.hex encode (value@ #/font.start unicode_range)) + "-" (\ nat.hex encode (value@ #/font.end unicode_range)))] (list ["unicode-range" unicode_range'])) #.None (list))] - (|> (list& ["font-family" (get@ #/font.family font)] - ["src" (format "url(" (get@ #/font.source font) ")")] - ["font-stretch" (|> font (get@ #/font.stretch) (maybe.else /value.normal_stretch) /value.value)] - ["font-style" (|> font (get@ #/font.style) (maybe.else /value.normal_style) /value.value)] - ["font-weight" (|> font (get@ #/font.weight) (maybe.else /value.normal_weight) /value.value)] + (|> (list& ["font-family" (value@ #/font.family font)] + ["src" (format "url(" (value@ #/font.source font) ")")] + ["font-stretch" (|> font (value@ #/font.stretch) (maybe.else /value.normal_stretch) /value.value)] + ["font-style" (|> font (value@ #/font.style) (maybe.else /value.normal_style) /value.value)] + ["font-weight" (|> font (value@ #/font.weight) (maybe.else /value.normal_weight) /value.value)] with_unicode) (list\map (function (_ [property value]) (format property ": " value ";"))) @@ -95,8 +95,8 @@ (:abstraction (format "@keyframes " (/value.value animation) " {" (|> frames (list\map (function (_ frame) - (format (/value.percentage (get@ #when frame)) " {" - (/style.inline (get@ #what frame)) + (format (/value.percentage (value@ #when frame)) " {" + (/style.inline (value@ #what frame)) "}"))) (text.interposed ..css_separator)) "}"))) diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index 0c8e8f70f..54de6d97a 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -988,7 +988,7 @@ (-> Percentage Text) (|>> :representation)) - (def: percentage_limit Nat (.inc 100)) + (def: percentage_limit Nat (.++ 100)) (def: .public (%% value) (-> Nat Percentage) @@ -1131,7 +1131,7 @@ (def: .public (clip rectangle) (-> Rectangle (Value Clip)) (`` (..apply "rect" (list (~~ (template [<side>] - [(:representation (get@ <side> rectangle))] + [(:representation (value@ <side> rectangle))] [#top] [#right] [#bottom] [#left])))))) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 7f1346df1..c26a7a751 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -44,7 +44,7 @@ max_size) padding (|> "0" (list.repeated padding_size) - text.joined)] + text.together)] (format padding number))) (def: blank " ") @@ -61,12 +61,12 @@ (|> ..octal_size (list.repeated <size>) (list\fold n.* 1) - inc)) + ++)) (exception: .public (<exception> {value Nat}) (exception.report ["Value" (%.nat value)] - ["Maximum" (%.nat (dec <limit>))])) + ["Maximum" (%.nat (-- <limit>))])) (abstract: .public <type> {} @@ -171,7 +171,7 @@ (def: checksum (-> Binary Nat) - (binary.fold n.+ 0)) + (binary.aggregate n.+ 0)) (def: checksum_checksum (|> ..dummy_checksum @@ -216,10 +216,10 @@ (def: ascii? (-> Text Bit) (|>> (\ utf8.codec encode) - (binary.fold (function (_ char verdict) - (.and verdict - (n.<= ..last_ascii char))) - true))) + (binary.aggregate (function (_ char verdict) + (.and verdict + (n.<= ..last_ascii char))) + true))) (exception: .public (not_ascii {text Text}) (exception.report @@ -232,17 +232,17 @@ (-> Binary (Try Binary)) (case (binary.size string) 0 (#try.Success string) - size (loop [end (dec size)] + size (loop [end (-- size)] (case end 0 (#try.Success (\ utf8.codec encode "")) _ (do try.monad [last_char (binary.read/8! end string)] (`` (case (.nat last_char) (^ (char (~~ (static ..null)))) - (recur (dec end)) + (recur (-- end)) _ - (binary.slice 0 (inc end) string)))))))) + (binary.slice 0 (++ end) string)))))))) (template [<type> <representation> <size> <exception> <in> <out> <writer> <parser> <none>] [(abstract: .public <type> @@ -640,11 +640,11 @@ (def: (header_writer header) (Writer Header) (let [checksum (|> header - (set@ #checksum ..dummy_checksum) + (with@ #checksum ..dummy_checksum) (format.result ..header_writer') ..checksum_code)] (|> header - (set@ #checksum checksum) + (with@ #checksum checksum) (format.result ..header_writer') (format.segment ..block_size)))) @@ -664,16 +664,16 @@ (format.segment (..rounded_content_size size)))] (writer [{#path path #mode mode - #user_id (get@ [#user #id] ownership) - #group_id (get@ [#group #id] ownership) + #user_id (value@ [#user #id] ownership) + #group_id (value@ [#group #id] ownership) #size size #modification_time (..modification_time modification_time) #checksum ..dummy_checksum #link_flag link_flag #link_name ..no_path #magic ..ustar - #user_name (get@ [#user #name] ownership) - #group_name (get@ [#group #name] ownership) + #user_name (value@ [#user #name] ownership) + #group_name (value@ [#group #name] ownership) #major_device ..no_device #minor_device ..no_device} content])))) @@ -812,26 +812,26 @@ (-> Link_Flag (Parser File)) (do <>.monad [header ..header_parser - _ (<>.assertion (exception.error ..wrong_link_flag [expected (get@ #link_flag header)]) - (same? expected (get@ #link_flag header))) - .let [size (get@ #size header) + _ (<>.assertion (exception.error ..wrong_link_flag [expected (value@ #link_flag header)]) + (same? expected (value@ #link_flag header))) + .let [size (value@ #size header) rounded_size (..rounded_content_size size)] content (<binary>.segment (..from_big size)) content (<>.lifted (..content content)) _ (<binary>.segment (n.- (..from_big size) rounded_size))] - (in [(get@ #path header) + (in [(value@ #path header) (|> header - (get@ #modification_time) + (value@ #modification_time) ..from_big .int duration.of_millis (duration.up (|> duration.second duration.millis .nat)) instant.absolute) - (get@ #mode header) - {#user {#name (get@ #user_name header) - #id (get@ #user_id header)} - #group {#name (get@ #group_name header) - #id (get@ #group_id header)}} + (value@ #mode header) + {#user {#name (value@ #user_name header) + #id (value@ #user_id header)} + #group {#name (value@ #group_name header) + #id (value@ #group_id header)}} content]))) (def: (file_name_parser expected extractor) @@ -839,9 +839,9 @@ (do <>.monad [header ..header_parser _ (<>.lifted - (exception.assertion ..wrong_link_flag [expected (get@ #link_flag header)] + (exception.assertion ..wrong_link_flag [expected (value@ #link_flag header)] (n.= (..link_flag expected) - (..link_flag (get@ #link_flag header)))))] + (..link_flag (value@ #link_flag header)))))] (in (extractor header)))) (def: entry_parser @@ -851,9 +851,9 @@ (<>.either (..file_parser ..normal) (..file_parser ..old_normal))) (\ <>.monad map (|>> #..Symbolic_Link) - (..file_name_parser ..symbolic_link (get@ #link_name))) + (..file_name_parser ..symbolic_link (value@ #link_name))) (\ <>.monad map (|>> #..Directory) - (..file_name_parser ..directory (get@ #path))) + (..file_name_parser ..directory (value@ #path))) (\ <>.monad map (|>> #..Contiguous) (..file_parser ..contiguous)))) diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux index 67722607c..b596734ea 100644 --- a/stdlib/source/library/lux/data/format/xml.lux +++ b/stdlib/source/library/lux/data/format/xml.lux @@ -269,7 +269,7 @@ ($_ text\compose prefix "<" tag attrs ">" (|> xml_children (list\map (|>> (recur (text\compose prefix text.tab)) (text\compose text.new_line))) - text.joined) + text.together) text.new_line prefix "</" tag ">"))))) )))) (def: decode |