aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/abstract
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/abstract/hash.lux18
1 files changed, 8 insertions, 10 deletions
diff --git a/stdlib/source/lux/abstract/hash.lux b/stdlib/source/lux/abstract/hash.lux
index f22bdc62a..fe994497b 100644
--- a/stdlib/source/lux/abstract/hash.lux
+++ b/stdlib/source/lux/abstract/hash.lux
@@ -18,13 +18,12 @@
(equivalence.sum (\ left &equivalence)
(\ right &equivalence)))
(def: (hash value)
- (<| (:coerce Nat)
- (case value
- (#.Left value)
- ("lux i64 *" +2 (:coerce Int (\ left hash value)))
+ (case value
+ (#.Left value)
+ (\ left hash value)
- (#.Right value)
- ("lux i64 *" +3 (:coerce Int (\ right hash value))))))))
+ (#.Right value)
+ (\ right hash value)))))
(def: #export (product left right)
(All [l r] (-> (Hash l) (Hash r) (Hash (& l r))))
@@ -33,7 +32,6 @@
(equivalence.product (\ left &equivalence)
(\ right &equivalence)))
(def: (hash [leftV rightV])
- (:coerce Nat
- ("lux i64 +"
- (:coerce Int (\ left hash leftV))
- (:coerce Int (\ right hash rightV)))))))
+ ("lux i64 +"
+ (\ left hash leftV)
+ (\ right hash rightV)))))