plutus-tx-constraints-1.2.0.0: Plutus Transaction Constraints
Safe HaskellNone
LanguageHaskell2010

Ledger.Tx.Constraints.ValidityInterval

Synopsis

Documentation

data ValidityInterval a Source #

ValidityInterval is a half open interval. Closed (inclusive) on the bottom, open (exclusive) on the top. A Nothing on the bottom is negative infinity, and a Nothing on the top is positive infinity.

Constructors

ValidityInterval 

Fields

Instances

Instances details
Functor ValidityInterval Source # 
Instance details

Defined in Ledger.Tx.Constraints.ValidityInterval

Methods

fmap :: (a -> b) -> ValidityInterval a -> ValidityInterval b

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

Defined in Ledger.Tx.Constraints.ValidityInterval

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

Defined in Ledger.Tx.Constraints.ValidityInterval

Generic (ValidityInterval a) Source # 
Instance details

Defined in Ledger.Tx.Constraints.ValidityInterval

Associated Types

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

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

Defined in Ledger.Tx.Constraints.ValidityInterval

Methods

parseJSON :: Value -> Parser (ValidityInterval a)

parseJSONList :: Value -> Parser [ValidityInterval a]

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

Defined in Ledger.Tx.Constraints.ValidityInterval

Methods

toJSON :: ValidityInterval a -> Value

toEncoding :: ValidityInterval a -> Encoding

toJSONList :: [ValidityInterval a] -> Value

toEncodingList :: [ValidityInterval a] -> Encoding

type Rep (ValidityInterval a) Source # 
Instance details

Defined in Ledger.Tx.Constraints.ValidityInterval

type Rep (ValidityInterval a) = D1 ('MetaData "ValidityInterval" "Ledger.Tx.Constraints.ValidityInterval" "plutus-tx-constraints-1.2.0.0-9U3hMxZSaNH217R0XsdS0A" 'False) (C1 ('MetaCons "ValidityInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "invalidBefore") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe a)) :*: S1 ('MetaSel ('Just "invalidHereafter") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe a))))

interval :: a -> a -> ValidityInterval a Source #

interval a b includes all values that are greater than or equal to a and smaller than b. In math. notation: [a,b)

from :: a -> ValidityInterval a Source #

from a is an ValidityInterval that includes all values that are greater than or equal to a. In math. notation: [a,+∞]

lessThan :: a -> ValidityInterval a Source #

lessThan a is an ValidityInterval that includes all values that are smaller than a. In math. notation: [-∞,a)

fromPlutusInterval :: Enum a => Interval a -> ValidityInterval a Source #