diff options
Diffstat (limited to 'stdlib/source/library/lux/control/parser/binary.lux')
-rw-r--r-- | stdlib/source/library/lux/control/parser/binary.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux index af28caeae..ec06bec54 100644 --- a/stdlib/source/library/lux/control/parser/binary.lux +++ b/stdlib/source/library/lux/control/parser/binary.lux @@ -1,7 +1,7 @@ (.module: [library [lux (#- and or nat int rev list type) - [type (#+ :share)] + [type (#+ :sharing)] [abstract [hash (#+ Hash)] [monad (#+ do)]] @@ -97,7 +97,7 @@ (def: #export frac (Parser Frac) - (//\map frac.from_bits ..bits/64)) + (//\map frac.of_bits ..bits/64)) (exception: #export (invalid_tag {range Nat} {byte Nat}) (exception.report @@ -111,8 +111,8 @@ (`` (case flag (^template [<number> <tag> <parser>] [<number> (\ ! map (|>> <tag>) <parser>)]) - ((~~ (template.splice <case>+))) - _ (//.lift (exception.throw ..invalid_tag [(~~ (template.count <case>+)) flag])))))) + ((~~ (template.spliced <case>+))) + _ (//.lift (exception.throw ..invalid_tag [(~~ (template.amount <case>+)) flag])))))) (def: #export (or left right) (All [l r] (-> (Parser l) (Parser r) (Parser (| l r)))) @@ -185,16 +185,16 @@ [(def: #export (<name> valueP) (All [v] (-> (Parser v) (Parser (Row v)))) (do //.monad - [count (: (Parser Nat) - <bits>)] + [amount (: (Parser Nat) + <bits>)] (loop [index 0 - output (:share [v] - (Parser v) - valueP - - (Row v) - row.empty)] - (if (n.< count index) + output (:sharing [v] + (Parser v) + valueP + + (Row v) + row.empty)] + (if (n.< amount index) (do //.monad [value valueP] (recur (.inc index) @@ -223,7 +223,7 @@ (All [a] (-> (Hash a) (Parser a) (Parser (Set a)))) (do //.monad [raw (..list value) - #let [output (set.from_list hash raw)] + #let [output (set.of_list hash raw)] _ (//.assert (exception.construct ..set_elements_are_not_unique []) (n.= (list.size raw) (set.size output)))] |