plutus-tx-1.36.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Ord

Synopsis

Documentation

class Eq a ⇒ Ord a where Source #

The Ord class is used for totally ordered datatypes.

Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.

Minimal complete definition

Nothing

Methods

compare ∷ a → a → Ordering Source #

(<) ∷ a → a → Bool infix 4 Source #

(<=) ∷ a → a → Bool infix 4 Source #

(>) ∷ a → a → Bool infix 4 Source #

(>=) ∷ a → a → Bool infix 4 Source #

max ∷ a → a → a Source #

min ∷ a → a → a Source #

Instances

Instances details
Ord BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Ord

Ord Rational Source # 
Instance details

Defined in PlutusTx.Ratio

Ord Integer Source # 
Instance details

Defined in PlutusTx.Ord

Ord () Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare ∷ () → () → Ordering Source #

(<) ∷ () → () → Bool Source #

(<=) ∷ () → () → Bool Source #

(>) ∷ () → () → Bool Source #

(>=) ∷ () → () → Bool Source #

max ∷ () → () → () Source #

min ∷ () → () → () Source #

Ord Bool Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compareBoolBoolOrdering Source #

(<)BoolBoolBool Source #

(<=)BoolBoolBool Source #

(>)BoolBoolBool Source #

(>=)BoolBoolBool Source #

maxBoolBoolBool Source #

minBoolBoolBool Source #

Ord a ⇒ Ord (Maybe a) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compareMaybe a → Maybe a → Ordering Source #

(<)Maybe a → Maybe a → Bool Source #

(<=)Maybe a → Maybe a → Bool Source #

(>)Maybe a → Maybe a → Bool Source #

(>=)Maybe a → Maybe a → Bool Source #

maxMaybe a → Maybe a → Maybe a Source #

minMaybe a → Maybe a → Maybe a Source #

Ord a ⇒ Ord [a] Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare ∷ [a] → [a] → Ordering Source #

(<) ∷ [a] → [a] → Bool Source #

(<=) ∷ [a] → [a] → Bool Source #

(>) ∷ [a] → [a] → Bool Source #

(>=) ∷ [a] → [a] → Bool Source #

max ∷ [a] → [a] → [a] Source #

min ∷ [a] → [a] → [a] Source #

(Ord a, Ord b) ⇒ Ord (Either a b) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compareEither a b → Either a b → Ordering Source #

(<)Either a b → Either a b → Bool Source #

(<=)Either a b → Either a b → Bool Source #

(>)Either a b → Either a b → Bool Source #

(>=)Either a b → Either a b → Bool Source #

maxEither a b → Either a b → Either a b Source #

minEither a b → Either a b → Either a b Source #

(Ord a, Ord b) ⇒ Ord (These a b) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compareThese a b → These a b → Ordering Source #

(<)These a b → These a b → Bool Source #

(<=)These a b → These a b → Bool Source #

(>)These a b → These a b → Bool Source #

(>=)These a b → These a b → Bool Source #

maxThese a b → These a b → These a b Source #

minThese a b → These a b → These a b Source #

(Ord a, Ord b) ⇒ Ord (a, b) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare ∷ (a, b) → (a, b) → Ordering Source #

(<) ∷ (a, b) → (a, b) → Bool Source #

(<=) ∷ (a, b) → (a, b) → Bool Source #

(>) ∷ (a, b) → (a, b) → Bool Source #

(>=) ∷ (a, b) → (a, b) → Bool Source #

max ∷ (a, b) → (a, b) → (a, b) Source #

min ∷ (a, b) → (a, b) → (a, b) Source #

data Ordering Source #

Constructors

LT 
EQ 
GT 

Instances

Instances details
FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON ∷ Value → Parser Ordering

parseJSONList ∷ Value → Parser [Ordering]

omittedFieldMaybe Ordering

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONOrdering → Value

toEncodingOrdering → Encoding

toJSONList ∷ [Ordering] → Value

toEncodingList ∷ [Ordering] → Encoding

omitFieldOrderingBool

Data Ordering

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Ordering → c Ordering Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Ordering Source #

toConstrOrderingConstr Source #

dataTypeOfOrderingDataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Ordering) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Ordering) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → OrderingOrdering Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Ordering → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Ordering → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → Ordering → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → Ordering → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → Ordering → m Ordering Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Ordering → m Ordering Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Ordering → m Ordering Source #

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep OrderingTypeType Source #

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Default Ordering 
Instance details

Defined in Data.Default.Class

Methods

defOrdering Source #

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnfOrdering → () Source #

Eq Ordering 
Instance details

Defined in GHC.Classes

Ord Ordering 
Instance details

Defined in GHC.Classes

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

AsEmpty Ordering 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty ∷ Prism' Ordering ()

Enum Ordering Source # 
Instance details

Defined in PlutusTx.Enum

Eq Ordering Source # 
Instance details

Defined in PlutusTx.Ord

Methods

(==)OrderingOrderingBool Source #

Semigroup Ordering Source # 
Instance details

Defined in PlutusTx.Semigroup

Methods

(<>)OrderingOrderingOrdering Source #

Serialise Ordering

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

type Rep Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1TypeType)))

Orphan instances

Eq Ordering Source # 
Instance details

Methods

(==)OrderingOrderingBool Source #