plutus-tx-1.69.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Bool

Synopsis

Documentation

data Bool Source #

Constructors

False 
True 

Instances

Instances details
FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data Bool

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Bool → c Bool Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Bool Source #

toConstr ∷ Bool → Constr Source #

dataTypeOf ∷ Bool → DataType Source #

dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Bool) Source #

dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Bool) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → Bool → Bool Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Bool → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Bool → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → Bool → [u] Source #

gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Bool → u Source #

gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Bool → m Bool Source #

gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Bool → m Bool Source #

gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Bool → m Bool Source #

Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool ∷ Type → Type Source #

Methods

from ∷ Bool → Rep Bool x Source #

to ∷ Rep Bool x → Bool Source #

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing ∷ ∀ (a ∷ Bool). Sing a → DemoteRep Bool

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range ∷ (Bool, Bool) → [Bool] Source #

index ∷ (Bool, Bool) → Bool → Int Source #

unsafeIndex ∷ (Bool, Bool) → Bool → Int Source #

inRange ∷ (Bool, Bool) → Bool → Bool Source #

rangeSize ∷ (Bool, Bool) → Int Source #

unsafeRangeSize ∷ (Bool, Bool) → Int Source #

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec ∷ Int → Bool → ShowS Source #

show ∷ Bool → String Source #

showList ∷ [Bool] → ShowS Source #

BitOps Bool 
Instance details

Defined in Basement.Bits

Methods

(.&.) ∷ Bool → Bool → Bool

(.|.) ∷ Bool → Bool → Bool

(.^.) ∷ Bool → Bool → Bool

(.<<.) ∷ Bool → CountOf Bool → Bool

(.>>.) ∷ Bool → CountOf Bool → Bool

bit ∷ Offset Bool → Bool

isBitSet ∷ Bool → Offset Bool → Bool

setBit ∷ Bool → Offset Bool → Bool

clearBit ∷ Bool → Offset Bool → Bool

FiniteBitsOps Bool 
Instance details

Defined in Basement.Bits

Methods

numberOfBits ∷ Bool → CountOf Bool

rotateL ∷ Bool → CountOf Bool → Bool

rotateR ∷ Bool → CountOf Bool → Bool

popCount ∷ Bool → CountOf Bool

bitFlip ∷ Bool → Bool

countLeadingZeros ∷ Bool → CountOf Bool

countTrailingZeros ∷ Bool → CountOf Bool

Default Bool 
Instance details

Defined in Data.Default.Internal

Methods

def ∷ Bool #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf ∷ Bool → () Source #

Buildable Bool 
Instance details

Defined in Formatting.Buildable

Methods

build ∷ Bool → Builder Source #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

(==) ∷ Bool → Bool → Bool Source #

(/=) ∷ Bool → Bool → Bool Source #

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare ∷ Bool → Bool → Ordering Source #

(<) ∷ Bool → Bool → Bool Source #

(<=) ∷ Bool → Bool → Bool Source #

(>) ∷ Bool → Bool → Bool Source #

(>=) ∷ Bool → Bool → Bool Source #

max ∷ Bool → Bool → Bool Source #

min ∷ Bool → Bool → Bool Source #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt ∷ Int → Bool → Int Source #

hash ∷ Bool → Int Source #

HasBlueprintDefinition Bool Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Bool ∷ [Type] Source #

HasFromBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type FromBuiltin Bool Source #

HasToBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type ToBuiltin Bool Source #

MkNil Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Enum Bool Source # 
Instance details

Defined in PlutusTx.Enum

Eq Bool Source # 
Instance details

Defined in PlutusTx.Eq

Methods

(==) ∷ Bool → Bool → Bool Source #

FromData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

ToData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

UnsafeFromData Bool Source # 
Instance details

Defined in PlutusTx.IsData.Instances

BoundedJoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom ∷ Bool Source #

BoundedMeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top ∷ Bool Source #

JoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(\/) ∷ Bool → Bool → Bool Source #

MeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(/\) ∷ Bool → Bool → Bool Source #

AdditiveMonoid Bool Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

zero ∷ Bool Source #

AdditiveSemigroup Bool Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(+) ∷ Bool → Bool → Bool Source #

MultiplicativeMonoid Bool Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

one ∷ Bool Source #

MultiplicativeSemigroup Bool Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(*) ∷ Bool → Bool → Bool Source #

Ord Bool Source # 
Instance details

Defined in PlutusTx.Ord

Methods

compare ∷ Bool → Bool → Ordering Source #

(<) ∷ Bool → Bool → Bool Source #

(<=) ∷ Bool → Bool → Bool Source #

(>) ∷ Bool → Bool → Bool Source #

(>=) ∷ Bool → Bool → Bool Source #

max ∷ Bool → Bool → Bool Source #

min ∷ Bool → Bool → Bool Source #

Show Bool Source # 
Instance details

Defined in PlutusTx.Show

Pretty Bool
>>> pretty True
True
Instance details

Defined in Prettyprinter.Internal

Methods

pretty ∷ Bool → Doc ann Source #

prettyList ∷ [Bool] → Doc ann Source #

Uniform Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformM ∷ StatefulGen g m ⇒ g → m Bool Source #

UniformRange Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformRM ∷ StatefulGen g m ⇒ (Bool, Bool) → g → m Bool Source #

isInRange ∷ (Bool, Bool) → Bool → Bool Source #

Serialise Bool

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Pretty Bool 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

pretty ∷ Bool → Doc b

prettyList ∷ [Bool] → Doc b

SingI 'False

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing ∷ Sing 'False

SingI 'True

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing ∷ Sing 'True

HasBlueprintSchema Bool referencedTypes Source # 
Instance details

Defined in PlutusTx.IsData.Instances

Methods

schema ∷ Schema referencedTypes Source #

HasFromOpaque Bool Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

fromOpaque ∷ Bool → Bool Source #

HasToOpaque Bool Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Methods

toOpaque ∷ Bool → Bool Source #

HasTermLevel uni Bool ⇒ Lift uni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift ∷ Bool → RTCompile uni fun (Term TyName Name uni fun ()) Source #

PrettyAnn ann Bool

Since: prettyprinter-1.7.2

Instance details

Defined in Prettyprinter.Internal

Methods

prettyAnn ∷ Bool → Doc ann Source #

prettyAnnList ∷ [Bool] → Doc ann Source #

DefaultPrettyBy config Bool 
Instance details

Defined in Text.PrettyBy.Internal

Methods

defaultPrettyBy ∷ config → Bool → Doc ann Source #

defaultPrettyListBy ∷ config → [Bool] → Doc ann Source #

NonDefaultPrettyBy ConstConfig Bool 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyDefaultBy config Bool ⇒ PrettyBy config Bool
>>> prettyBy () True
True
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy ∷ config → Bool → Doc ann Source #

prettyListBy ∷ config → [Bool] → Doc ann Source #

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift ∷ Quote m ⇒ Bool → m Exp Source #

liftTyped ∷ ∀ (m ∷ Type → Type). Quote m ⇒ Bool → Code m Bool Source #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

KnownBuiltinTypeIn DefaultUni term Bool ⇒ MakeKnownIn DefaultUni term Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown ∷ Bool → BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term Bool ⇒ ReadKnownIn DefaultUni term Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Bool Source #

Contains DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

HasTypeLevel uni Bool ⇒ Typeable uni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep ∷ Proxy Bool → RTCompile uni fun (Type TyName uni ()) Source #

KnownBuiltinTypeAst tyname DefaultUni Bool ⇒ KnownTypeAst tyname DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni Bool ∷ Bool Source #

type ToHoles DefaultUni hole Bool ∷ [Hole] Source #

type ToBinds DefaultUni acc Bool ∷ [Some TyNameRep] Source #

Methods

typeAst ∷ Type tyname DefaultUni () Source #

type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
type Rep Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 ∷ Type → Type))
data Sing (a ∷ Bool) 
Instance details

Defined in GHC.Generics

data Sing (a ∷ Bool) where
type Unroll Bool Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

type Unroll Bool = '[Bool]
type FromBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type ToBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool = MV_Bool (MVector s Word8)
type IsBuiltin DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Bool 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni hole Bool 
Instance details

Defined in PlutusCore.Default.Universe

(&&) ∷ Bool → Bool → Bool infixr 3 Source #

Logical AND. Short-circuits if the first argument evaluates to False.

>>> True && False
False
>>> False && error ()
False 

(||) ∷ Bool → Bool → Bool infixr 2 Source #

Logical OR. Short-circuits if the first argument evaluates to True.

>>> True || False
True
>>> True || error ()
True 

not ∷ Bool → Bool Source #

Logical negation

>>> not True
False 

otherwise ∷ Bool Source #

otherwise is defined as the value True. It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...