diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/reference/variable.lux | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/reference/variable.lux b/stdlib/source/library/lux/tool/compiler/reference/variable.lux index 0efc63114..0614c5b30 100644 --- a/stdlib/source/library/lux/tool/compiler/reference/variable.lux +++ b/stdlib/source/library/lux/tool/compiler/reference/variable.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}] - [hash {"+" Hash}]] - [control - [pipe {"+" case>}]] - [data - [text - ["%" format {"+" Format}]]] - [math - [number - ["n" nat] - ["i" int]]]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}] + [hash {"+" Hash}]] + [control + ["[0]" pipe]] + [data + [text + ["%" format {"+" Format}]]] + [math + [number + ["n" nat] + ["i" int]]]]]) (type: .public Register Nat) @@ -42,29 +42,32 @@ ..equivalence) (def: hash - (|>> (case> (^template [<factor> <tag>] - [{<tag> register} - (|> register - (# n.hash hash) - (n.* <factor>))]) - ([2 #Local] - [3 #Foreign]))))) + (|>> (pipe.case + (^template [<factor> <tag>] + [{<tag> register} + (|> register + (# n.hash hash) + (n.* <factor>))]) + ([2 #Local] + [3 #Foreign]))))) (template: .public (self) [{..#Local 0}]) (def: .public self? (-> Variable Bit) - (|>> (case> (^ (..self)) - true + (|>> (pipe.case + (^ (..self)) + true - _ - false))) + _ + false))) (def: .public format (Format Variable) - (|>> (case> {#Local local} - (%.format "+" (%.nat local)) - - {#Foreign foreign} - (%.format "-" (%.nat foreign))))) + (|>> (pipe.case + {#Local local} + (%.format "+" (%.nat local)) + + {#Foreign foreign} + (%.format "-" (%.nat foreign))))) |