diff options
author | Eduardo Julian | 2018-07-10 00:24:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-10 00:24:01 -0400 |
commit | eb201f6e669f802650fdf06ea1acb1ef5682297b (patch) | |
tree | f8d1fd7dc4b10d46ac0d3ee5ca018f0907060ad0 /stdlib/source/lux/macro | |
parent | 474c270f548298fc6404e9c53f038b94eba7e997 (diff) |
- Re-named "struct:" to "structure:".
Diffstat (limited to 'stdlib/source/lux/macro')
-rw-r--r-- | stdlib/source/lux/macro/code.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/macro/poly/json.lux | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/macro/code.lux b/stdlib/source/lux/macro/code.lux index 1094d7e0e..42f575a57 100644 --- a/stdlib/source/lux/macro/code.lux +++ b/stdlib/source/lux/macro/code.lux @@ -56,7 +56,7 @@ [local-tag #.Tag "Produces a local tag (a tag with no module prefix)."]) ## [Structures] -(struct: #export _ (Equivalence Code) +(structure: #export _ (Equivalence Code) (def: (= x y) (case [x y] (^template [<tag> <eq>] diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index fd85087d7..2a708ee2e 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -43,7 +43,7 @@ (def: low-mask Nat (|> +1 (bit.left-shift +32) dec)) (def: high-mask Nat (|> low-mask (bit.left-shift +32))) -(struct: _ (Codec JSON Nat) +(structure: _ (Codec JSON Nat) (def: (encode input) (let [high (|> input (bit.and high-mask) (bit.logical-right-shift +32)) low (bit.and low-mask input)] @@ -58,7 +58,7 @@ (wrap (n/+ (|> high frac-to-int .nat (bit.left-shift +32)) (|> low frac-to-int .nat)))))) -(struct: _ (Codec JSON Int) +(structure: _ (Codec JSON Int) (def: encode (|>> .nat (:: Codec<JSON,Nat> encode))) (def: decode (|>> (:: Codec<JSON,Nat> decode) (:: e.Functor<Error> map .int)))) @@ -71,7 +71,7 @@ #.None #//.Null (#.Some value) (writer value)))) -(struct: Codec<JSON,Qty> +(structure: Codec<JSON,Qty> (All [unit] (Codec JSON (unit.Qty unit))) (def: encode (|>> unit.out (:: Codec<JSON,Int> encode))) |