plutus-ledger-api-1.0.0.1: Interface to the Plutus ledger for the Cardano ledger.
Safe Haskell None
Language Haskell2010

Plutus.V1.Ledger.Interval

Description

A type for intervals and associated functions.

Synopsis

Documentation

data Interval a Source #

An interval of a s.

The interval may be either closed or open at either end, meaning that the endpoints may or may not be included in the interval.

The interval can also be unbounded on either side.

Instances

Instances details
Functor Interval Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Methods

fmap :: (a -> b) -> Interval a -> Interval b Source #

( Typeable DefaultUni a, Lift DefaultUni ( LowerBound a), Lift DefaultUni ( UpperBound a)) => Lift DefaultUni ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Generic ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( Interval a) :: Type -> Type Source #

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Ord a => JoinSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => MeetSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => BoundedJoinSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => BoundedMeetSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni Interval Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Interval a) = D1 (' MetaData "Interval" "Plutus.V1.Ledger.Interval" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "Interval" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ivFrom") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( LowerBound a)) :*: S1 (' MetaSel (' Just "ivTo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( UpperBound a))))

data UpperBound a Source #

The upper bound of an interval.

Instances

Instances details
Functor UpperBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( Typeable DefaultUni a, Lift DefaultUni ( Extended a)) => Lift DefaultUni ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Generic ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( UpperBound a) :: Type -> Type Source #

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni UpperBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

data LowerBound a Source #

The lower bound of an interval.

Instances

Instances details
Functor LowerBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( Typeable DefaultUni a, Lift DefaultUni ( Extended a)) => Lift DefaultUni ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Generic ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( LowerBound a) :: Type -> Type Source #

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni LowerBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

data Extended a Source #

A set extended with a positive and negative infinity.

Instances

Instances details
Functor Extended Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Methods

fmap :: (a -> b) -> Extended a -> Extended b Source #

( Typeable DefaultUni a, Lift DefaultUni a) => Lift DefaultUni ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Generic ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( Extended a) :: Type -> Type Source #

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

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

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni Extended Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Extended a) = D1 (' MetaData "Extended" "Plutus.V1.Ledger.Interval" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "NegInf" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "Finite" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)) :+: C1 (' MetaCons "PosInf" ' PrefixI ' False ) ( U1 :: Type -> Type )))

type Closure = Bool Source #

Whether a bound is inclusive or not.

member :: Ord a => a -> Interval a -> Bool Source #

Check whether a value is in an interval.

interval :: a -> a -> Interval a Source #

interval a b includes all values that are greater than or equal to a and smaller than or equal to b . Therefore it includes a and b .

from :: a -> Interval a Source #

from a is an Interval that includes all values that are greater than or equal to a .

to :: a -> Interval a Source #

to a is an Interval that includes all values that are smaller than or equal to a .

always :: Interval a Source #

An Interval that covers every slot.

hull :: Ord a => Interval a -> Interval a -> Interval a Source #

'hull a b' is the smallest interval containing a and b .

intersection :: Ord a => Interval a -> Interval a -> Interval a Source #

'intersection a b' is the largest interval that is contained in a and in b , if it exists.

overlaps :: ( Enum a, Ord a) => Interval a -> Interval a -> Bool Source #

Check whether two intervals overlap, that is, whether there is a value that is a member of both intervals.

contains :: Ord a => Interval a -> Interval a -> Bool Source #

a contains b is true if the Interval b is entirely contained in a . That is, a contains b if for every entry s , if member s b then member s a .

before :: Ord a => a -> Interval a -> Bool Source #

Check if a value is earlier than the beginning of an Interval .

after :: Ord a => a -> Interval a -> Bool Source #

Check if a value is later than the end of a Interval .