plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
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 Bool Source # 
Instance details

Defined in PlutusTx.Ord

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 BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Ord

Ord Rational Source # 
Instance details

Defined in PlutusTx.Ratio

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 (Maybe a) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare :: Maybe 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 #

max :: Maybe a -> Maybe a -> Maybe a Source #

min :: Maybe a -> Maybe a -> Maybe a Source #

(Ord a, Ord b) => Ord (Either a b) Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare :: Either 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 #

max :: Either a b -> Either a b -> Either a b Source #

min :: Either a b -> Either a b -> Either 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 #

(Ord k, Ord v) => Ord (Map k v) Source # 
Instance details

Defined in PlutusTx.AssocMap

Methods

compare :: Map k v -> Map k v -> Ordering Source #

(<) :: Map k v -> Map k v -> Bool Source #

(<=) :: Map k v -> Map k v -> Bool Source #

(>) :: Map k v -> Map k v -> Bool Source #

(>=) :: Map k v -> Map k v -> Bool Source #

max :: Map k v -> Map k v -> Map k v Source #

min :: Map k v -> Map k v -> Map k v Source #

data Ordering Source #

Constructors

LT 
EQ 
GT 

Instances

Instances details
Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Ordering 
Instance details

Defined in GHC.Classes

Data Ordering

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering Source #

toConstr :: Ordering -> Constr Source #

dataTypeOf :: Ordering -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) Source #

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source #

Ord Ordering 
Instance details

Defined in GHC.Classes

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type Source #

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () Source #

AsEmpty Ordering 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' Ordering ()

Serialise Ordering 
Instance details

Defined in Codec.Serialise.Class

Methods

encode :: Ordering -> Encoding

decode :: Decoder s Ordering

encodeList :: [Ordering] -> Encoding

decodeList :: Decoder s [Ordering]

FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Ordering

parseJSONList :: Value -> Parser [Ordering]

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Ordering -> Value

toEncoding :: Ordering -> Encoding

toJSONList :: [Ordering] -> Value

toEncodingList :: [Ordering] -> Encoding

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Eq Ordering Source # 
Instance details

Defined in PlutusTx.Ord

Methods

(==) :: Ordering -> Ordering -> Bool Source #

Semigroup Ordering Source # 
Instance details

Defined in PlutusTx.Semigroup

Enum Ordering Source # 
Instance details

Defined in PlutusTx.Enum

type Rep Ordering 
Instance details

Defined in GHC.Generics

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

Orphan instances

Eq Ordering Source # 
Instance details

Methods

(==) :: Ordering -> Ordering -> Bool Source #