diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/abstract/algebra.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/abstract/hash.lux | 10 | ||||
-rw-r--r-- | stdlib/source/lux/abstract/monoid.lux | 13 |
3 files changed, 13 insertions, 12 deletions
diff --git a/stdlib/source/lux/abstract/algebra.lux b/stdlib/source/lux/abstract/algebra.lux index 0d066fb4f..14d29bf16 100644 --- a/stdlib/source/lux/abstract/algebra.lux +++ b/stdlib/source/lux/abstract/algebra.lux @@ -1,7 +1,7 @@ (.module: [lux #* [control - functor]]) + [functor (#+ Fix)]]]) (type: #export (Algebra f a) (-> (f a) a)) diff --git a/stdlib/source/lux/abstract/hash.lux b/stdlib/source/lux/abstract/hash.lux index e2716335c..62e72e52a 100644 --- a/stdlib/source/lux/abstract/hash.lux +++ b/stdlib/source/lux/abstract/hash.lux @@ -11,14 +11,14 @@ (: (-> a Nat) hash)) -(def: #export (product leftH rightH) +(def: #export (product left right) (All [l r] (-> (Hash l) (Hash r) (Hash [l r]))) (structure (def: &equivalence - (equivalence.product (:: leftH &equivalence) - (:: rightH &equivalence))) + (equivalence.product (:: left &equivalence) + (:: right &equivalence))) (def: (hash [leftV rightV]) (:coerce Nat ("lux i64 *" - (:coerce Int (:: leftH hash leftV)) - (:coerce Int (:: rightH hash rightV))))))) + (:coerce Int (:: left hash leftV)) + (:coerce Int (:: right hash rightV))))))) diff --git a/stdlib/source/lux/abstract/monoid.lux b/stdlib/source/lux/abstract/monoid.lux index 33d082020..088fda263 100644 --- a/stdlib/source/lux/abstract/monoid.lux +++ b/stdlib/source/lux/abstract/monoid.lux @@ -11,9 +11,10 @@ (def: #export (compose Monoid<l> Monoid<r>) (All [l r] (-> (Monoid l) (Monoid r) (Monoid [l r]))) - (structure (def: identity - [(:: Monoid<l> identity) (:: Monoid<r> identity)]) - - (def: (compose [lL rL] [lR rR]) - [(:: Monoid<l> compose lL lR) - (:: Monoid<r> compose rL rR)]))) + (structure + (def: identity + [(:: Monoid<l> identity) (:: Monoid<r> identity)]) + + (def: (compose [lL rL] [lR rR]) + [(:: Monoid<l> compose lL lR) + (:: Monoid<r> compose rL rR)]))) |