plutarch-ledger-api-3.2.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plutarch.LedgerApi.Interval

Description

This module is meant to be imported qualified, as some of its identifiers clash with the Plutarch prelude, as well as other parts of the Plutarch API.

Synopsis

Types

newtype PInterval (a :: S -> Type) (s :: S) Source #

Since: 2.0.0

Constructors

PInterval (Term s (PDataRecord '["from" ':= PLowerBound a, "to" ':= PUpperBound a])) 

Instances

Instances details
PTryFrom PData a => PTryFrom PData (PAsData (PInterval a)) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PAsData (PInterval a)) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PInterval a)), Reduce (PTryFromExcess PData (PAsData (PInterval a)) s)) -> Term s r) -> Term s r

PTryFrom PData a => PTryFrom PData (PInterval a) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PInterval a) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PInterval a), Reduce (PTryFromExcess PData (PInterval a) s)) -> Term s r) -> Term s r

PIsData (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PInterval a)) -> Term s (PInterval a)

pdataImpl :: forall (s :: S). Term s (PInterval a) -> Term s PData

PDataFields (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PFields (PInterval a) :: [PLabeledType]

Methods

ptoFields :: forall (s :: S). Term s (PInterval a) -> Term s (PDataRecord (PFields (PInterval a)))

PEq (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#==) :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s PBool

(FromData (AsHaskell a), ToData (AsHaskell a)) => PLiftable (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type AsHaskell (PInterval a)

type PlutusRepr (PInterval a)

Methods

toPlutarchRepr :: AsHaskell (PInterval a) -> PlutusRepr (PInterval a)

toPlutarch :: forall (s :: S). AsHaskell (PInterval a) -> PLifted s (PInterval a)

fromPlutarchRepr :: PlutusRepr (PInterval a) -> Maybe (AsHaskell (PInterval a))

fromPlutarch :: (forall (s :: S). PLifted s (PInterval a)) -> Either LiftError (AsHaskell (PInterval a))

(PIsData a, PEnumerable a) => POrd (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pmax :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s (PInterval a)

pmin :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s (PInterval a)

(PIsData a, PEnumerable a) => PPartialOrd (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#<=) :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s PBool

(#<) :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s PBool

(#>=) :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s PBool

(#>) :: forall (s :: S). Term s (PInterval a) -> Term s (PInterval a) -> Term s PBool

DerivePlutusType (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type DPTStrat (PInterval a)

PlutusType (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PInner (PInterval a) :: PType

type PCovariant' (PInterval a)

type PContravariant' (PInterval a)

type PVariant' (PInterval a)

Methods

pcon' :: forall (s :: S). PInterval a s -> Term s (PInner (PInterval a))

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PInterval a)) -> (PInterval a s -> Term s b) -> Term s b

(PIsData a, PShow a) => PShow (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pshow' :: forall (s :: S). Bool -> Term s (PInterval a) -> Term s PString

Generic (PInterval a s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type Rep (PInterval a s) :: Type -> Type Source #

Methods

from :: PInterval a s -> Rep (PInterval a s) x Source #

to :: Rep (PInterval a s) x -> PInterval a s Source #

type PTryFromExcess PData (PAsData (PInterval a)) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PAsData (PInterval a)) = PTryFromExcess PData (PInner (PAsData (PInterval a)))
type PTryFromExcess PData (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PInterval a) = PTryFromExcess PData (PInner (PInterval a))
type PFields (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PFields (PInterval a) = Helper (PInner (PInterval a))
type AsHaskell (PInterval a) Source #

@since WIP

Instance details

Defined in Plutarch.LedgerApi.Interval

type AsHaskell (PInterval a) = AsHaskell (DeriveDataPLiftable (PInterval a) (Interval (AsHaskell a)))
type PlutusRepr (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PlutusRepr (PInterval a) = PlutusRepr (DeriveDataPLiftable (PInterval a) (Interval (AsHaskell a)))
type DPTStrat (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type DPTStrat (PInterval a) = PlutusTypeData
type PContravariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PContravariant' (PInterval a) = All2 PContravariant'' (PCode (PInterval a))
type PCovariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PCovariant' (PInterval a) = All2 PCovariant'' (PCode (PInterval a))
type PInner (PInterval a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PInner (PInterval a) = DerivedPInner (DPTStrat (PInterval a)) (PInterval a)
type PVariant' (PInterval a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PVariant' (PInterval a) = All2 PVariant'' (PCode (PInterval a))
type Rep (PInterval a s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type Rep (PInterval a s) = D1 ('MetaData "PInterval" "Plutarch.LedgerApi.Interval" "plutarch-ledger-api-3.2.1-6pZLN6XlvMZ4r7ZEuopoAx" 'True) (C1 ('MetaCons "PInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord '["from" ':= PLowerBound a, "to" ':= PUpperBound a])))))

newtype PLowerBound (a :: S -> Type) (s :: S) Source #

Since: 2.0.0

Constructors

PLowerBound (Term s (PDataRecord '["_0" ':= PExtended a, "_1" ':= PBool])) 

Instances

Instances details
PTryFrom PData a => PTryFrom PData (PAsData (PLowerBound a)) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PAsData (PLowerBound a)) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PLowerBound a)), Reduce (PTryFromExcess PData (PAsData (PLowerBound a)) s)) -> Term s r) -> Term s r

PTryFrom PData a => PTryFrom PData (PLowerBound a) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PLowerBound a) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PLowerBound a), Reduce (PTryFromExcess PData (PLowerBound a) s)) -> Term s r) -> Term s r

PIsData (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PLowerBound a)) -> Term s (PLowerBound a)

pdataImpl :: forall (s :: S). Term s (PLowerBound a) -> Term s PData

PDataFields (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PFields (PLowerBound a) :: [PLabeledType]

Methods

ptoFields :: forall (s :: S). Term s (PLowerBound a) -> Term s (PDataRecord (PFields (PLowerBound a)))

(PIsData a, PCountable a) => PEq (PLowerBound a) Source #

@since WIP

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#==) :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s PBool

(FromData (AsHaskell a), ToData (AsHaskell a)) => PLiftable (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type AsHaskell (PLowerBound a)

type PlutusRepr (PLowerBound a)

Methods

toPlutarchRepr :: AsHaskell (PLowerBound a) -> PlutusRepr (PLowerBound a)

toPlutarch :: forall (s :: S). AsHaskell (PLowerBound a) -> PLifted s (PLowerBound a)

fromPlutarchRepr :: PlutusRepr (PLowerBound a) -> Maybe (AsHaskell (PLowerBound a))

fromPlutarch :: (forall (s :: S). PLifted s (PLowerBound a)) -> Either LiftError (AsHaskell (PLowerBound a))

(PIsData a, PCountable a) => POrd (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pmax :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s (PLowerBound a)

pmin :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s (PLowerBound a)

(PIsData a, PCountable a) => PPartialOrd (PLowerBound a) Source #

@since WIP

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#<=) :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s PBool

(#<) :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s PBool

(#>=) :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s PBool

(#>) :: forall (s :: S). Term s (PLowerBound a) -> Term s (PLowerBound a) -> Term s PBool

DerivePlutusType (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type DPTStrat (PLowerBound a)

PlutusType (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PInner (PLowerBound a) :: PType

type PCovariant' (PLowerBound a)

type PContravariant' (PLowerBound a)

type PVariant' (PLowerBound a)

Methods

pcon' :: forall (s :: S). PLowerBound a s -> Term s (PInner (PLowerBound a))

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PLowerBound a)) -> (PLowerBound a s -> Term s b) -> Term s b

(PIsData a, PShow a) => PShow (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pshow' :: forall (s :: S). Bool -> Term s (PLowerBound a) -> Term s PString

Generic (PLowerBound a s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type Rep (PLowerBound a s) :: Type -> Type Source #

Methods

from :: PLowerBound a s -> Rep (PLowerBound a s) x Source #

to :: Rep (PLowerBound a s) x -> PLowerBound a s Source #

type PTryFromExcess PData (PAsData (PLowerBound a)) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PAsData (PLowerBound a)) = PTryFromExcess PData (PInner (PAsData (PLowerBound a)))
type PTryFromExcess PData (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PLowerBound a) = PTryFromExcess PData (PInner (PLowerBound a))
type PFields (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PFields (PLowerBound a) = Helper (PInner (PLowerBound a))
type AsHaskell (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type AsHaskell (PLowerBound a) = AsHaskell (DeriveDataPLiftable (PLowerBound a) (LowerBound (AsHaskell a)))
type PlutusRepr (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PlutusRepr (PLowerBound a) = PlutusRepr (DeriveDataPLiftable (PLowerBound a) (LowerBound (AsHaskell a)))
type DPTStrat (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type DPTStrat (PLowerBound a) = PlutusTypeData
type PContravariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PContravariant' (PLowerBound a) = All2 PContravariant'' (PCode (PLowerBound a))
type PCovariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PCovariant' (PLowerBound a) = All2 PCovariant'' (PCode (PLowerBound a))
type PInner (PLowerBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PInner (PLowerBound a) = DerivedPInner (DPTStrat (PLowerBound a)) (PLowerBound a)
type PVariant' (PLowerBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PVariant' (PLowerBound a) = All2 PVariant'' (PCode (PLowerBound a))
type Rep (PLowerBound a s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type Rep (PLowerBound a s) = D1 ('MetaData "PLowerBound" "Plutarch.LedgerApi.Interval" "plutarch-ledger-api-3.2.1-6pZLN6XlvMZ4r7ZEuopoAx" 'True) (C1 ('MetaCons "PLowerBound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord '["_0" ':= PExtended a, "_1" ':= PBool])))))

newtype PUpperBound (a :: S -> Type) (s :: S) Source #

Since: 2.0.0

Constructors

PUpperBound (Term s (PDataRecord '["_0" ':= PExtended a, "_1" ':= PBool])) 

Instances

Instances details
PTryFrom PData a => PTryFrom PData (PAsData (PUpperBound a)) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PAsData (PUpperBound a)) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PUpperBound a)), Reduce (PTryFromExcess PData (PAsData (PUpperBound a)) s)) -> Term s r) -> Term s r

PTryFrom PData a => PTryFrom PData (PUpperBound a) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PUpperBound a) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PUpperBound a), Reduce (PTryFromExcess PData (PUpperBound a) s)) -> Term s r) -> Term s r

PIsData (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PUpperBound a)) -> Term s (PUpperBound a)

pdataImpl :: forall (s :: S). Term s (PUpperBound a) -> Term s PData

PDataFields (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PFields (PUpperBound a) :: [PLabeledType]

Methods

ptoFields :: forall (s :: S). Term s (PUpperBound a) -> Term s (PDataRecord (PFields (PUpperBound a)))

(PIsData a, PEnumerable a) => PEq (PUpperBound a) Source #

@since WIP

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#==) :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s PBool

(FromData (AsHaskell a), ToData (AsHaskell a)) => PLiftable (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type AsHaskell (PUpperBound a)

type PlutusRepr (PUpperBound a)

Methods

toPlutarchRepr :: AsHaskell (PUpperBound a) -> PlutusRepr (PUpperBound a)

toPlutarch :: forall (s :: S). AsHaskell (PUpperBound a) -> PLifted s (PUpperBound a)

fromPlutarchRepr :: PlutusRepr (PUpperBound a) -> Maybe (AsHaskell (PUpperBound a))

fromPlutarch :: (forall (s :: S). PLifted s (PUpperBound a)) -> Either LiftError (AsHaskell (PUpperBound a))

(PIsData a, PEnumerable a) => POrd (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pmax :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s (PUpperBound a)

pmin :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s (PUpperBound a)

(PIsData a, PEnumerable a) => PPartialOrd (PUpperBound a) Source #

@since WIP

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#<=) :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s PBool

(#<) :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s PBool

(#>=) :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s PBool

(#>) :: forall (s :: S). Term s (PUpperBound a) -> Term s (PUpperBound a) -> Term s PBool

DerivePlutusType (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type DPTStrat (PUpperBound a)

PlutusType (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PInner (PUpperBound a) :: PType

type PCovariant' (PUpperBound a)

type PContravariant' (PUpperBound a)

type PVariant' (PUpperBound a)

Methods

pcon' :: forall (s :: S). PUpperBound a s -> Term s (PInner (PUpperBound a))

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PUpperBound a)) -> (PUpperBound a s -> Term s b) -> Term s b

(PIsData a, PShow a) => PShow (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pshow' :: forall (s :: S). Bool -> Term s (PUpperBound a) -> Term s PString

Generic (PUpperBound a s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type Rep (PUpperBound a s) :: Type -> Type Source #

Methods

from :: PUpperBound a s -> Rep (PUpperBound a s) x Source #

to :: Rep (PUpperBound a s) x -> PUpperBound a s Source #

type PTryFromExcess PData (PAsData (PUpperBound a)) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PAsData (PUpperBound a)) = PTryFromExcess PData (PInner (PAsData (PUpperBound a)))
type PTryFromExcess PData (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PUpperBound a) = PTryFromExcess PData (PInner (PUpperBound a))
type PFields (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PFields (PUpperBound a) = Helper (PInner (PUpperBound a))
type AsHaskell (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type AsHaskell (PUpperBound a) = AsHaskell (DeriveDataPLiftable (PUpperBound a) (UpperBound (AsHaskell a)))
type PlutusRepr (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PlutusRepr (PUpperBound a) = PlutusRepr (DeriveDataPLiftable (PUpperBound a) (UpperBound (AsHaskell a)))
type DPTStrat (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type DPTStrat (PUpperBound a) = PlutusTypeData
type PContravariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PContravariant' (PUpperBound a) = All2 PContravariant'' (PCode (PUpperBound a))
type PCovariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PCovariant' (PUpperBound a) = All2 PCovariant'' (PCode (PUpperBound a))
type PInner (PUpperBound a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PInner (PUpperBound a) = DerivedPInner (DPTStrat (PUpperBound a)) (PUpperBound a)
type PVariant' (PUpperBound a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PVariant' (PUpperBound a) = All2 PVariant'' (PCode (PUpperBound a))
type Rep (PUpperBound a s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type Rep (PUpperBound a s) = D1 ('MetaData "PUpperBound" "Plutarch.LedgerApi.Interval" "plutarch-ledger-api-3.2.1-6pZLN6XlvMZ4r7ZEuopoAx" 'True) (C1 ('MetaCons "PUpperBound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord '["_0" ':= PExtended a, "_1" ':= PBool])))))

data PExtended (a :: S -> Type) (s :: S) Source #

Since: 2.0.0

Constructors

PNegInf (Term s (PDataRecord '[])) 
PFinite (Term s (PDataRecord '["_0" ':= a])) 
PPosInf (Term s (PDataRecord '[])) 

Instances

Instances details
PTryFrom PData a => PTryFrom PData (PAsData (PExtended a)) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PAsData (PExtended a)) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData (PExtended a)), Reduce (PTryFromExcess PData (PAsData (PExtended a)) s)) -> Term s r) -> Term s r

PTryFrom PData a => PTryFrom PData (PExtended a) Source #

Since: 3.1.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PTryFromExcess PData (PExtended a) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PExtended a), Reduce (PTryFromExcess PData (PExtended a) s)) -> Term s r) -> Term s r

PIsData (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PExtended a)) -> Term s (PExtended a)

pdataImpl :: forall (s :: S). Term s (PExtended a) -> Term s PData

PEq (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#==) :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s PBool

(FromData (AsHaskell a), ToData (AsHaskell a)) => PLiftable (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type AsHaskell (PExtended a)

type PlutusRepr (PExtended a)

Methods

toPlutarchRepr :: AsHaskell (PExtended a) -> PlutusRepr (PExtended a)

toPlutarch :: forall (s :: S). AsHaskell (PExtended a) -> PLifted s (PExtended a)

fromPlutarchRepr :: PlutusRepr (PExtended a) -> Maybe (AsHaskell (PExtended a))

fromPlutarch :: (forall (s :: S). PLifted s (PExtended a)) -> Either LiftError (AsHaskell (PExtended a))

(POrd a, PIsData a) => POrd (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pmax :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s (PExtended a)

pmin :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s (PExtended a)

(POrd a, PIsData a) => PPartialOrd (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

(#<=) :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s PBool

(#<) :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s PBool

(#>=) :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s PBool

(#>) :: forall (s :: S). Term s (PExtended a) -> Term s (PExtended a) -> Term s PBool

DerivePlutusType (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type DPTStrat (PExtended a)

PlutusType (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type PInner (PExtended a) :: PType

type PCovariant' (PExtended a)

type PContravariant' (PExtended a)

type PVariant' (PExtended a)

Methods

pcon' :: forall (s :: S). PExtended a s -> Term s (PInner (PExtended a))

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PExtended a)) -> (PExtended a s -> Term s b) -> Term s b

(PIsData a, PShow a) => PShow (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

Methods

pshow' :: forall (s :: S). Bool -> Term s (PExtended a) -> Term s PString

Generic (PExtended a s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

Associated Types

type Rep (PExtended a s) :: Type -> Type Source #

Methods

from :: PExtended a s -> Rep (PExtended a s) x Source #

to :: Rep (PExtended a s) x -> PExtended a s Source #

type PTryFromExcess PData (PAsData (PExtended a)) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PAsData (PExtended a)) = PTryFromExcess PData (PInner (PAsData (PExtended a)))
type PTryFromExcess PData (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PTryFromExcess PData (PExtended a) = PTryFromExcess PData (PInner (PExtended a))
type AsHaskell (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type AsHaskell (PExtended a) = AsHaskell (DeriveDataPLiftable (PExtended a) (Extended (AsHaskell a)))
type PlutusRepr (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PlutusRepr (PExtended a) = PlutusRepr (DeriveDataPLiftable (PExtended a) (Extended (AsHaskell a)))
type DPTStrat (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type DPTStrat (PExtended a) = PlutusTypeData
type PContravariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PContravariant' (PExtended a) = All2 PContravariant'' (PCode (PExtended a))
type PCovariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PCovariant' (PExtended a) = All2 PCovariant'' (PCode (PExtended a))
type PInner (PExtended a) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type PInner (PExtended a) = DerivedPInner (DPTStrat (PExtended a)) (PExtended a)
type PVariant' (PExtended a) Source # 
Instance details

Defined in Plutarch.LedgerApi.Interval

type PVariant' (PExtended a) = All2 PVariant'' (PCode (PExtended a))
type Rep (PExtended a s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Interval

type Rep (PExtended a s) = D1 ('MetaData "PExtended" "Plutarch.LedgerApi.Interval" "plutarch-ledger-api-3.2.1-6pZLN6XlvMZ4r7ZEuopoAx" 'False) (C1 ('MetaCons "PNegInf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord ('[] :: [PLabeledType]))))) :+: (C1 ('MetaCons "PFinite" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord '["_0" ':= a])))) :+: C1 ('MetaCons "PPosInf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord ('[] :: [PLabeledType])))))))

Functions

Creation

psingleton :: forall (a :: S -> Type) (s :: S). Term s (PAsData a :--> PInterval a) Source #

Given x, create the interval [x, x].

Since: 2.1.1

pfrom :: forall (a :: S -> Type) (s :: S). Term s (PAsData a :--> PInterval a) Source #

Given x, create the interval [x, +infty)

Since: 2.1.1

pto :: forall (a :: S -> Type) (s :: S). Term s (PAsData a :--> PInterval a) Source #

Given x, create the interval (-infty, x].

Since: 2.1.1

palways :: forall (a :: S -> Type) (s :: S). (FromData (AsHaskell a), ToData (AsHaskell a)) => Term s (PInterval a) Source #

Create the interval (-infty, +infty).

Since: 2.1.1

pinterval :: forall (a :: S -> Type) (s :: S). Term s (PAsData a :--> (PAsData a :--> PInterval a)) Source #

pinterval x y creates the interval [x, y].

Since: 2.1.1

pinclusiveLowerBound :: forall (a :: S -> Type) (s :: S). (PIsData a, PCountable a) => Term s (PLowerBound a :--> PExtended a) Source #

Turn a PLowerBound into a single inclusive bounding value.

@since WIP

pinclusiveUpperBound :: forall (a :: S -> Type) (s :: S). (PIsData a, PEnumerable a) => Term s (PUpperBound a :--> PExtended a) Source #

Turn a PUpperBound into a single inclusive bounding value.

@since WIP

Queries

pmember :: forall (a :: S -> Type) (s :: S). (PIsData a, PEnumerable a) => Term s (PAsData a :--> (PInterval a :--> PBool)) Source #

Check if a value is inside the given interval.

@since WIP

pcontains :: forall (a :: S -> Type) (s :: S). (PIsData a, PEnumerable a) => Term s (PInterval a :--> (PInterval a :--> PBool)) Source #

pcontains # i1 # i2 is true if i2 is entirely contained in i1: more specifically, if for any s, if pmember # s # i2, then pmember # s # i1.

@since WIP

pbefore :: forall (a :: S -> Type) (s :: S). (POrd a, PIsData a) => Term s (a :--> (PInterval a :--> PBool)) Source #

before x i is true if x is earlier than the start of i.

Since: 2.1.1

pafter :: forall (a :: S -> Type) (s :: S). (POrd a, PIsData a) => Term s (a :--> (PInterval a :--> PBool)) Source #

after x u is true if x is later than the end of i.

Since: 2.1.1

pisEmpty :: forall (a :: S -> Type) (s :: S). (PIsData a, PEnumerable a) => Term s (PInterval a :--> PBool) Source #

Check if a PInterval is empty.

@since WIP

Transformation

phull :: forall (a :: S -> Type) (s :: S). (POrd a, PIsData a) => Term s (PInterval a :--> (PInterval a :--> PInterval a)) Source #

phull i1 i2 gives the smallest interval that contains both i1 and i2.

Since: 2.1.1

pintersection :: forall (a :: S -> Type) (s :: S). (POrd a, PIsData a) => Term s (PInterval a :--> (PInterval a :--> PInterval a)) Source #

pintersection i1 i2 gives the largest interval that is contained in both i1 and i2.

Since: 2.1.1