plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Slot

Description

Slots and slot ranges.

Synopsis

Documentation

newtype Slot Source #

The slot number. This is a good proxy for time, since on the Cardano blockchain slots pass at a constant rate.

Constructors

Slot 

Fields

Instances

Instances details
Enum Slot Source # 
Instance details

Defined in Ledger.Slot

Eq Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

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

(/=) :: Slot -> Slot -> Bool Source #

Integral Slot Source # 
Instance details

Defined in Ledger.Slot

Data Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

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

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

toConstr :: Slot -> Constr Source #

dataTypeOf :: Slot -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Num Slot Source # 
Instance details

Defined in Ledger.Slot

Ord Slot Source # 
Instance details

Defined in Ledger.Slot

Real Slot Source # 
Instance details

Defined in Ledger.Slot

Show Slot Source # 
Instance details

Defined in Ledger.Slot

Generic Slot Source # 
Instance details

Defined in Ledger.Slot

Associated Types

type Rep Slot :: Type -> Type Source #

Methods

from :: Slot -> Rep Slot x Source #

to :: Rep Slot x -> Slot Source #

Serialise Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

encode :: Slot -> Encoding

decode :: Decoder s Slot

encodeList :: [Slot] -> Encoding

decodeList :: Decoder s [Slot]

Hashable Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

hashWithSalt :: Int -> Slot -> Int

hash :: Slot -> Int

FromJSON Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

parseJSON :: Value -> Parser Slot

parseJSONList :: Value -> Parser [Slot]

FromJSONKey Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

fromJSONKey :: FromJSONKeyFunction Slot

fromJSONKeyList :: FromJSONKeyFunction [Slot]

ToJSON Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

toJSON :: Slot -> Value

toEncoding :: Slot -> Encoding

toJSONList :: [Slot] -> Value

toEncodingList :: [Slot] -> Encoding

ToJSONKey Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

toJSONKey :: ToJSONKeyFunction Slot

toJSONKeyList :: ToJSONKeyFunction [Slot]

Enum Slot Source # 
Instance details

Defined in Ledger.Slot

Eq Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

(==) :: Slot -> Slot -> Bool

AdditiveGroup Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

(-) :: Slot -> Slot -> Slot

AdditiveMonoid Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

zero :: Slot

AdditiveSemigroup Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

(+) :: Slot -> Slot -> Slot

Ord Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

compare :: Slot -> Slot -> Ordering

(<) :: Slot -> Slot -> Bool

(<=) :: Slot -> Slot -> Bool

(>) :: Slot -> Slot -> Bool

(>=) :: Slot -> Slot -> Bool

max :: Slot -> Slot -> Slot

min :: Slot -> Slot -> Slot

Pretty Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

pretty :: Slot -> Doc ann #

prettyList :: [Slot] -> Doc ann #

FromData Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

fromBuiltinData :: BuiltinData -> Maybe Slot

ToData Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

toBuiltinData :: Slot -> BuiltinData

UnsafeFromData Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

unsafeFromBuiltinData :: BuiltinData -> Slot

Lift DefaultUni Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

lift :: Slot -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni Slot Source # 
Instance details

Defined in Ledger.Slot

Methods

typeRep :: Proxy Slot -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep Slot Source # 
Instance details

Defined in Ledger.Slot

type Rep Slot = D1 ('MetaData "Slot" "Ledger.Slot" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "Slot" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

width :: SlotRange -> Maybe Integer Source #

Number of Slots covered by the interval, if finite. width (from x) == Nothing.

Orphan instances

Serialise a => Serialise (Interval a) Source # 
Instance details

Methods

encode :: Interval a -> Encoding

decode :: Decoder s (Interval a)

encodeList :: [Interval a] -> Encoding

decodeList :: Decoder s [Interval a]

Serialise a => Serialise (Extended a) Source # 
Instance details

Methods

encode :: Extended a -> Encoding

decode :: Decoder s (Extended a)

encodeList :: [Extended a] -> Encoding

decodeList :: Decoder s [Extended a]

Serialise a => Serialise (LowerBound a) Source # 
Instance details

Methods

encode :: LowerBound a -> Encoding

decode :: Decoder s (LowerBound a)

encodeList :: [LowerBound a] -> Encoding

decodeList :: Decoder s [LowerBound a]

Serialise a => Serialise (UpperBound a) Source # 
Instance details

Methods

encode :: UpperBound a -> Encoding

decode :: Decoder s (UpperBound a)

encodeList :: [UpperBound a] -> Encoding

decodeList :: Decoder s [UpperBound a]

Hashable a => Hashable (Interval a) Source # 
Instance details

Methods

hashWithSalt :: Int -> Interval a -> Int

hash :: Interval a -> Int

Hashable a => Hashable (Extended a) Source # 
Instance details

Methods

hashWithSalt :: Int -> Extended a -> Int

hash :: Extended a -> Int

Hashable a => Hashable (LowerBound a) Source # 
Instance details

Methods

hashWithSalt :: Int -> LowerBound a -> Int

hash :: LowerBound a -> Int

Hashable a => Hashable (UpperBound a) Source # 
Instance details

Methods

hashWithSalt :: Int -> UpperBound a -> Int

hash :: UpperBound a -> Int

FromJSON a => FromJSON (Interval a) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (Interval a)

parseJSONList :: Value -> Parser [Interval a]

FromJSON a => FromJSON (Extended a) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (Extended a)

parseJSONList :: Value -> Parser [Extended a]

FromJSON a => FromJSON (LowerBound a) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (LowerBound a)

parseJSONList :: Value -> Parser [LowerBound a]

FromJSON a => FromJSON (UpperBound a) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (UpperBound a)

parseJSONList :: Value -> Parser [UpperBound a]

ToJSON a => ToJSON (Interval a) Source # 
Instance details

Methods

toJSON :: Interval a -> Value

toEncoding :: Interval a -> Encoding

toJSONList :: [Interval a] -> Value

toEncodingList :: [Interval a] -> Encoding

ToJSON a => ToJSON (Extended a) Source # 
Instance details

Methods

toJSON :: Extended a -> Value

toEncoding :: Extended a -> Encoding

toJSONList :: [Extended a] -> Value

toEncodingList :: [Extended a] -> Encoding

ToJSON a => ToJSON (LowerBound a) Source # 
Instance details

Methods

toJSON :: LowerBound a -> Value

toEncoding :: LowerBound a -> Encoding

toJSONList :: [LowerBound a] -> Value

toEncodingList :: [LowerBound a] -> Encoding

ToJSON a => ToJSON (UpperBound a) Source # 
Instance details

Methods

toJSON :: UpperBound a -> Value

toEncoding :: UpperBound a -> Encoding

toJSONList :: [UpperBound a] -> Value

toEncodingList :: [UpperBound a] -> Encoding