diff options
Diffstat (limited to 'stdlib/source/library/lux/data/format/tar.lux')
-rw-r--r-- | stdlib/source/library/lux/data/format/tar.lux | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 567d1a10a..422d11814 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -33,7 +33,7 @@ [world ["[0]" file]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (type: Size Nat) @@ -78,18 +78,18 @@ (def: .public (<in> value) (-> Nat (Try <type>)) (if (n.< <limit> value) - {try.#Success (:abstraction value)} + {try.#Success (abstraction value)} (exception.except <exception> [value]))) (def: .public <out> (-> <type> Nat) - (|>> :representation)) + (|>> representation)) (def: <writer> (Writer <type>) (let [suffix <suffix> padded_size (n.+ (text.size suffix) <size>)] - (|>> :representation + (|>> representation (# n.octal encoded) (..octal_padding <size>) (text.suffix suffix) @@ -99,7 +99,7 @@ (def: <coercion> (-> Nat <type>) (|>> (n.% <limit>) - :abstraction)) + abstraction)) )] [not_a_small_number small_limit ..small_size @@ -161,11 +161,11 @@ (def: from_checksum (-> Checksum Text) - (|>> :representation)) + (|>> representation)) (def: dummy_checksum Checksum - (:abstraction " ")) + (abstraction " ")) (def: checksum_suffix (format ..blank ..null)) @@ -176,7 +176,7 @@ (def: checksum_checksum (|> ..dummy_checksum - :representation + representation (# utf8.codec encoded) ..checksum)) @@ -188,13 +188,13 @@ (# n.octal encoded) (..octal_padding ..small_size) (text.suffix ..checksum_suffix) - :abstraction)) + abstraction)) (def: checksum_writer (Writer Checksum) (let [padded_size (n.+ (text.size ..checksum_suffix) ..small_size)] - (|>> :representation + (|>> representation (# utf8.codec encoded) (format.segment padded_size)))) @@ -207,7 +207,7 @@ value (<>.lifted (# n.octal decoded digits))] (in [value - (:abstraction (format digits ..checksum_suffix))]))) + (abstraction (format digits ..checksum_suffix))]))) ) (def: last_ascii @@ -263,18 +263,18 @@ binary.size (n.> <size>)) (exception.except <exception> [value]) - {try.#Success (:abstraction value)}) + {try.#Success (abstraction value)}) (exception.except ..not_ascii [value]))) (def: .public <out> (-> <type> <representation>) - (|>> :representation)) + (|>> representation)) (def: <writer> (Writer <type>) (let [suffix ..null padded_size (n.+ (text.size suffix) <size>)] - (|>> :representation + (|>> representation (text.suffix suffix) (# utf8.codec encoded) (format.segment padded_size)))) @@ -308,17 +308,17 @@ Text (def: ustar - (:abstraction "ustar ")) + (abstraction "ustar ")) (def: from_magic (-> Magic Text) - (|>> :representation)) + (|>> representation)) (def: magic_writer (Writer Magic) (let [padded_size (n.+ (text.size ..null) ..magic_size)] - (|>> :representation + (|>> representation (# utf8.codec encoded) (format.segment padded_size)))) @@ -331,7 +331,7 @@ _ (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end))] (<>.lifted - (# try.monad each (|>> :abstraction) + (# try.monad each (|>> abstraction) (# utf8.codec decoded string))))) ) @@ -396,11 +396,11 @@ (def: link_flag (-> Link_Flag Char) - (|>> :representation)) + (|>> representation)) (def: link_flag_writer (Writer Link_Flag) - (|>> :representation + (|>> representation format.bits/8)) (with_expansions [<options> (as_is [0 old_normal] @@ -415,7 +415,7 @@ (template [<flag> <name>] [(def: <name> Link_Flag - (:abstraction <flag>))] + (abstraction <flag>))] <options> ) @@ -444,17 +444,17 @@ (def: .public mode (-> Mode Nat) - (|>> :representation)) + (|>> representation)) (def: .public (and left right) (-> Mode Mode Mode) - (:abstraction - (i64.or (:representation left) - (:representation right)))) + (abstraction + (i64.or (representation left) + (representation right)))) (def: mode_writer (Writer Mode) - (|>> :representation + (|>> representation ..small try.trusted ..small_writer)) @@ -483,7 +483,7 @@ (template [<code> <name>] [(def: .public <name> Mode - (:abstraction (number.oct <code>)))] + (abstraction (number.oct <code>)))] <options> ) @@ -514,11 +514,11 @@ (Parser Mode) (do [! <>.monad] [value (# ! each ..from_small ..small_parser)] - (if (n.> (:representation ..maximum_mode) + (if (n.> (representation ..maximum_mode) value) (<>.lifted (exception.except ..invalid_mode [value])) - (in (:abstraction value)))))) + (in (abstraction value)))))) ) (def: maximum_content_size @@ -534,15 +534,15 @@ (-> Binary (Try Content)) (do try.monad [size (..big (binary.size content))] - (in (:abstraction [size content])))) + (in (abstraction [size content])))) (def: from_content (-> Content [Big Binary]) - (|>> :representation)) + (|>> representation)) (def: .public data (-> Content Binary) - (|>> :representation product.right)) + (|>> representation product.right)) ) (type: .public ID |