aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/abstract
diff options
context:
space:
mode:
authorEduardo Julian2020-12-09 20:42:37 -0400
committerEduardo Julian2020-12-09 20:42:37 -0400
commit893c76ad530ca0e81cd84602543c3114407f4592 (patch)
tree6d14f38c7b9f5b37809615d0dca7545b36405525 /stdlib/source/lux/abstract
parent8df63aae42c40ac0413ccfacc3b2e8eb72e00a15 (diff)
Added support for "Commons Clause" to Licentia.
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)))))