aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/target/jvm/encoding/unsigned.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/target/jvm/encoding/unsigned.lux')
-rw-r--r--stdlib/source/lux/target/jvm/encoding/unsigned.lux11
1 files changed, 6 insertions, 5 deletions
diff --git a/stdlib/source/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/lux/target/jvm/encoding/unsigned.lux
index b0b8ff312..56885d576 100644
--- a/stdlib/source/lux/target/jvm/encoding/unsigned.lux
+++ b/stdlib/source/lux/target/jvm/encoding/unsigned.lux
@@ -5,7 +5,8 @@
[order (#+ Order)]]
[data
[number
- ["." i64]]
+ ["." i64]
+ ["n" nat]]
[format
[".F" binary (#+ Writer)]]]
[macro
@@ -24,14 +25,14 @@
(structure: #export equivalence
(All [brand] (Equivalence (Unsigned brand)))
(def: (= reference sample)
- (n/= (:representation reference) (:representation sample))))
+ (n.= (:representation reference) (:representation sample))))
(structure: #export order
(All [brand] (Order (Unsigned brand)))
(def: &equivalence ..equivalence)
(def: (< reference sample)
- (n/< (:representation reference) (:representation sample))))
+ (n.< (:representation reference) (:representation sample))))
(template [<bytes> <name> <size> <constructor> <max> <+>]
[(with-expansions [<raw> (template.identifier [<name> "'"])]
@@ -42,7 +43,7 @@
(def: #export <max>
<name>
- (|> <bytes> (n/* i64.bits-per-byte) i64.mask :abstraction))
+ (|> <bytes> (n.* i64.bits-per-byte) i64.mask :abstraction))
(def: #export <constructor>
(-> Nat <name>)
@@ -52,7 +53,7 @@
(-> <name> <name> <name>)
(:abstraction
(i64.and (:representation <max>)
- (n/+ (:representation parameter)
+ (n.+ (:representation parameter)
(:representation subject)))))]
[1 U1 u1-bytes u1 max-u1 u1/+]