module UVMHS.Core.Classes.Order where import UVMHS.Core.Init import qualified Prelude as HS infix 4 ≡,≢,⋚,≤,≥,<,> (≡) ∷ (Eq a) ⇒ a → a → 𝔹 ≡ :: forall a. Eq a => a -> a -> 𝔹 (≡) = a -> a -> 𝔹 forall a. Eq a => a -> a -> 𝔹 (HS.==) (≢) ∷ (Eq a) ⇒ a → a → 𝔹 ≢ :: forall a. Eq a => a -> a -> 𝔹 (≢) = a -> a -> 𝔹 forall a. Eq a => a -> a -> 𝔹 (HS./=) (⋚) ∷ (Ord a) ⇒ a → a → Ordering ⋚ :: forall a. Ord a => a -> a -> Ordering (⋚) = a -> a -> Ordering forall a. Ord a => a -> a -> Ordering compare (≤) ∷ (Ord a) ⇒ a → a → 𝔹 a x ≤ :: forall a. Ord a => a -> a -> 𝔹 ≤ a y = case a x a -> a -> Ordering forall a. Ord a => a -> a -> Ordering ⋚ a y of {Ordering LT → 𝔹 True;Ordering EQ → 𝔹 True;Ordering GT → 𝔹 False} (≥) ∷ (Ord a) ⇒ a → a → 𝔹 a x ≥ :: forall a. Ord a => a -> a -> 𝔹 ≥ a y = case a x a -> a -> Ordering forall a. Ord a => a -> a -> Ordering ⋚ a y of {Ordering LT → 𝔹 False;Ordering EQ → 𝔹 True;Ordering GT → 𝔹 True} (<) ∷ (Ord a) ⇒ a → a → 𝔹 < :: forall a. Ord a => a -> a -> 𝔹 (<) = a -> a -> 𝔹 forall a. Ord a => a -> a -> 𝔹 (HS.<) (>) ∷ (Ord a) ⇒ a → a → 𝔹 > :: forall a. Ord a => a -> a -> 𝔹 (>) = a -> a -> 𝔹 forall a. Ord a => a -> a -> 𝔹 (HS.>) (⩏) ∷ (Ord a) ⇒ a → a → a a x ⩏ :: forall a. Ord a => a -> a -> a ⩏ a y | a x a -> a -> 𝔹 forall a. Ord a => a -> a -> 𝔹 ≤ a y = a y | 𝔹 otherwise = a x (⩎) ∷ (Ord a) ⇒ a → a → a a x ⩎ :: forall a. Ord a => a -> a -> a ⩎ a y | a x a -> a -> 𝔹 forall a. Ord a => a -> a -> 𝔹 ≤ a y = a x | 𝔹 otherwise = a y minBy ∷ (Ord b) ⇒ (a → b) → a → a → a minBy :: forall b a. Ord b => (a -> b) -> a -> a -> a minBy a -> b f a x a y | a -> b f a x b -> b -> 𝔹 forall a. Ord a => a -> a -> 𝔹 ≤ a -> b f a y = a x | 𝔹 otherwise = a y maxBy ∷ (Ord b) ⇒ (a → b) → a → a → a maxBy :: forall b a. Ord b => (a -> b) -> a -> a -> a maxBy a -> b f a x a y | a -> b f a x b -> b -> 𝔹 forall a. Ord a => a -> a -> 𝔹 ≥ a -> b f a y = a x | 𝔹 otherwise = a y