From 29c50af6729cf1bba2a45c2cfbbbe358036414f7 Mon Sep 17 00:00:00 2001 From: Valentin Robert Date: Sun, 6 Oct 2024 10:38:32 -0700 Subject: [PATCH] fix curry/uncurry being swapped Currying is the process of turning a function that takes its arguments all at once into a function that takes them one by one. In UVMHS, they are currently defined "backwards" wrt. the common use definition. --- src/UVMHS/Core/Init.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UVMHS/Core/Init.hs b/src/UVMHS/Core/Init.hs index 8fafe2ac..2d4f6bc1 100644 --- a/src/UVMHS/Core/Init.hs +++ b/src/UVMHS/Core/Init.hs @@ -390,11 +390,11 @@ mirror f = \ c b a → f a b c on ∷ (b → b → c) → (a → b) → (a → a → c) on p f = \ x y → p (f x) (f y) -curry ∷ (a → b → c) → a ∧ b → c -curry f (x :* y) = f x y +uncurry ∷ (a → b → c) → a ∧ b → c +uncurry f (x :* y) = f x y -uncurry ∷ (a ∧ b → c) → a → b → c -uncurry f x y = f (x :* y) +curry ∷ (a ∧ b → c) → a → b → c +curry f x y = f (x :* y) -----------------------------------