aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/macro/poly/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/macro/poly/json.lux')
-rw-r--r--stdlib/source/lux/macro/poly/json.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux
index 971048296..2e288648e 100644
--- a/stdlib/source/lux/macro/poly/json.lux
+++ b/stdlib/source/lux/macro/poly/json.lux
@@ -39,12 +39,12 @@
(function (_ input)
(non-rec (rec-encode non-rec) input)))
-(def: low-mask Nat (|> +1 (bit.shift-left +32) n/dec))
-(def: high-mask Nat (|> low-mask (bit.shift-left +32)))
+(def: low-mask Nat (|> +1 (bit.left-shift +32) n/dec))
+(def: high-mask Nat (|> low-mask (bit.left-shift +32)))
(struct: _ (Codec JSON Nat)
(def: (encode input)
- (let [high (|> input (bit.and high-mask) (bit.shift-right +32))
+ (let [high (|> input (bit.and high-mask) (bit.logical-right-shift +32))
low (bit.and low-mask input)]
(#//.Array (sequence (|> high nat-to-int int-to-frac #//.Number)
(|> low nat-to-int int-to-frac #//.Number)))))
@@ -54,7 +54,7 @@
(do p.Monad<Parser>
[high //.number
low //.number])
- (wrap (n/+ (|> high frac-to-int int-to-nat (bit.shift-left +32))
+ (wrap (n/+ (|> high frac-to-int int-to-nat (bit.left-shift +32))
(|> low frac-to-int int-to-nat))))))
(struct: _ (Codec JSON Int)