From c5b61d2f46ac19bf511197f3a537c4be0f47df33 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 27 Aug 2021 20:59:34 -0400 Subject: Updates to the Ruby compiler. --- stdlib/source/library/lux/math/modular.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source/library/lux/math/modular.lux') diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index acfdbab2d..5b462ccfd 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -35,13 +35,13 @@ #value Int}) (def: .public (modular modulus value) - (All [%] (-> (Modulus %) Int (Mod %))) + (All (_ %) (-> (Modulus %) Int (Mod %))) (:abstraction {#modulus modulus #value (i.mod (//.divisor modulus) value)})) (template [ ] [(def: .public - (All [%] (-> (Mod %) )) + (All (_ %) (-> (Mod %) )) (|>> :representation ))] [modulus (Modulus %) product.left] @@ -63,7 +63,7 @@ (.and (.one_of "-+") (.many .decimal)))) (implementation: .public (codec expected) - (All [%] (-> (Modulus %) (Codec Text (Mod %)))) + (All (_ %) (-> (Modulus %) (Codec Text (Mod %)))) (def: (encoded modular) (let [[_ value] (:representation modular)] @@ -82,7 +82,7 @@ (template [ ] [(def: .public ( reference subject) - (All [%] (-> (Mod %) (Mod %) Bit)) + (All (_ %) (-> (Mod %) (Mod %) Bit)) (let [[_ reference] (:representation reference) [_ subject] (:representation subject)] ( reference subject)))] @@ -95,19 +95,19 @@ ) (implementation: .public equivalence - (All [%] (Equivalence (Mod %))) + (All (_ %) (Equivalence (Mod %))) (def: = ..=)) (implementation: .public order - (All [%] (Order (Mod %))) + (All (_ %) (Order (Mod %))) (def: &equivalence ..equivalence) (def: < ..<)) (template [ ] [(def: .public ( param subject) - (All [%] (-> (Mod %) (Mod %) (Mod %))) + (All (_ %) (-> (Mod %) (Mod %) (Mod %))) (let [[modulus param] (:representation param) [_ subject] (:representation subject)] (:abstraction {#modulus modulus @@ -122,7 +122,7 @@ (template [ ] [(implementation: .public ( modulus) - (All [%] (-> (Modulus %) (Monoid (Mod %)))) + (All (_ %) (-> (Modulus %) (Monoid (Mod %)))) (def: identity (..modular modulus )) @@ -134,7 +134,7 @@ ) (def: .public (inverse modular) - (All [%] (-> (Mod %) (Maybe (Mod %)))) + (All (_ %) (-> (Mod %) (Maybe (Mod %)))) (let [[modulus value] (:representation modular) [[vk mk] gcd] (i.extended_gcd value (//.divisor modulus))] (case gcd @@ -149,7 +149,7 @@ ["Subject" (i\encoded (//.divisor subject))])) (def: .public (adapter reference subject) - (All [r% s%] + (All (_ r% s%) (-> (Modulus r%) (Modulus s%) (Try (-> (Mod s%) (Mod r%))))) (if (//.= reference subject) -- cgit v1.2.3