plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Builtin.Bool

Synopsis

Type

data PBool (s :: S) Source #

Builtin Plutus boolean.

@since WIP

Constructors

PTrue 
PFalse 

Instances

Instances details
PIsData PBool Source #

Instance for PBool following the Plutus IsData repr given by makeIsDataIndexed ''Bool [('False,0),('True,1)], which is used in TxInfo via Closure.

Instance details

Defined in Plutarch.Builtin

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PBool) -> Term s PBool Source #

pdataImpl :: forall (s :: S). Term s PBool -> Term s PData Source #

PEq PBool Source # 
Instance details

Defined in Plutarch.Internal.Eq

Methods

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

PLiftable PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

Associated Types

type AsHaskell PBool Source #

type PlutusRepr PBool Source #

POrd PBool Source # 
Instance details

Defined in Plutarch.Internal.Ord

Methods

pmax :: forall (s :: S). Term s PBool -> Term s PBool -> Term s PBool Source #

pmin :: forall (s :: S). Term s PBool -> Term s PBool -> Term s PBool Source #

PPartialOrd PBool Source # 
Instance details

Defined in Plutarch.Internal.Ord

Methods

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

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

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

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

PlutusType PBool Source #

@since WIP

Instance details

Defined in Plutarch.Builtin.Bool

Methods

pcon' :: forall (s :: S). PBool s -> Term s (PInner PBool) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PBool) -> (PBool s -> Term s b) -> Term s b Source #

PShow PBool Source # 
Instance details

Defined in Plutarch.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s PBool -> Term s PString Source #

PTryFrom PData (PAsData PBool) Source #

Since: 1.7.0

Instance details

Defined in Plutarch.Builtin

Associated Types

type PTryFromExcess PData (PAsData PBool) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PBool), Reduce (PTryFromExcess PData (PAsData PBool) s)) -> Term s r) -> Term s r Source #

Show (PBool s) Source #

@since WIP

Instance details

Defined in Plutarch.Builtin.Bool

type AsHaskell PBool Source #

@since WIP

Instance details

Defined in Plutarch.Builtin.Bool

type PlutusRepr PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

type PContravariant' PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

type PCovariant' PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

type PInner PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

type PVariant' PBool Source # 
Instance details

Defined in Plutarch.Builtin.Bool

type PTryFromExcess PData (PAsData PBool) Source # 
Instance details

Defined in Plutarch.Builtin

Builtin

pbuiltinIfThenElse :: forall (a :: S -> Type) (s :: S). Term s (PBool :--> (a :--> (a :--> PDelayed a))) Source #

@since WIP

Functions

pif' :: forall (a :: S -> Type) (s :: S). Term s (PBool :--> (a :--> (a :--> a))) Source #

Strict if-then-else. Emits slightly less code than the lazy version.

@since WIP

pif :: forall (a :: S -> Type) (s :: S). Term s PBool -> Term s a -> Term s a -> Term s a Source #

Lazy if-then-else.

@since WIP

pnot :: forall (s :: S). Term s (PBool :--> PBool) Source #

Boolean negation.

@since WIP

(#&&) :: forall (s :: S). Term s PBool -> Term s PBool -> Term s PBool infixr 3 Source #

Lazy AND for terms.

@since WIP

(#||) :: forall (s :: S). Term s PBool -> Term s PBool -> Term s PBool infixr 2 Source #

Lazy OR for terms.

@since WIP

por :: forall (s :: S). Term s (PBool :--> (PDelayed PBool :--> PDelayed PBool)) Source #

Hoisted lazy OR at the Plutarch level.

@since WIP

pand :: forall (s :: S). Term s (PBool :--> (PDelayed PBool :--> PDelayed PBool)) Source #

Hoisted lazy AND at the Plutarch level.

@since WIP

pand' :: forall (s :: S). Term s (PBool :--> (PBool :--> PBool)) Source #

As pand, but strict.

@since WIP

por' :: Term s (PBool :--> (PBool :--> PBool)) Source #

As por, but strict.

@since WIP