plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe Haskell None
Language Haskell2010

PlutusTx.Bool

Synopsis

Documentation

data Bool Source #

Constructors

False
True

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Bool
Instance details

Defined in GHC.Classes

Data Bool

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Bool -> c Bool Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Bool Source #

toConstr :: Bool -> Constr Source #

dataTypeOf :: Bool -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Bool ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Bool ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Bool -> Bool Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Bool -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Bool -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Bool -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Bool -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Bool -> m Bool Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Bool -> m Bool Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Bool -> m Bool Source #

Ord Bool
Instance details

Defined in GHC.Classes

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Hashable Bool
Instance details

Defined in Data.Hashable.Class

ToJSON Bool
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Bool
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Bool
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Bool
Instance details

Defined in Data.Aeson.Types.FromJSON

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

FiniteBitsOps Bool
Instance details

Defined in Basement.Bits

BitOps Bool
Instance details

Defined in Basement.Bits

NFData Bool
Instance details

Defined in Control.DeepSeq

Unbox Bool
Instance details

Defined in Data.Vector.Unboxed.Base

ExMemoryUsage Bool
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Pretty Bool
>>> pretty True
True
Instance details

Defined in Prettyprinter.Internal

Uniform Bool
Instance details

Defined in System.Random.Internal

UniformRange Bool
Instance details

Defined in System.Random.Internal

Serialise Bool

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Pretty Bool
Instance details

Defined in Text.PrettyPrint.Annotated.WL

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing :: forall (a :: Bool ). Sing a -> DemoteRep Bool

Eq Bool Source #
Instance details

Defined in PlutusTx.Eq

Ord Bool Source #
Instance details

Defined in PlutusTx.Ord

MultiplicativeMonoid Bool Source #
Instance details

Defined in PlutusTx.Numeric

MultiplicativeSemigroup Bool Source #
Instance details

Defined in PlutusTx.Numeric

AdditiveMonoid Bool Source #
Instance details

Defined in PlutusTx.Numeric

AdditiveSemigroup Bool Source #
Instance details

Defined in PlutusTx.Numeric

BoundedMeetSemiLattice Bool Source #
Instance details

Defined in PlutusTx.Lattice

BoundedJoinSemiLattice Bool Source #
Instance details

Defined in PlutusTx.Lattice

MeetSemiLattice Bool Source #
Instance details

Defined in PlutusTx.Lattice

JoinSemiLattice Bool Source #
Instance details

Defined in PlutusTx.Lattice

UnsafeFromData Bool Source #
Instance details

Defined in PlutusTx.IsData.Instances

FromData Bool Source #
Instance details

Defined in PlutusTx.IsData.Instances

ToData Bool Source #
Instance details

Defined in PlutusTx.IsData.Instances

Enum Bool Source #
Instance details

Defined in PlutusTx.Enum

Lift Bool
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Bool
Instance details

Defined in Data.Array.Base

Vector Vector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

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

Defined in Text.PrettyBy.Internal

DefaultPrettyBy config Bool
Instance details

Defined in Text.PrettyBy.Internal

NonDefaultPrettyBy ConstConfig Bool
Instance details

Defined in PlutusCore.Pretty.PrettyConst

MVector MVector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

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

Lift DefaultUni Bool Source #
Instance details

Defined in PlutusTx.Lift.Instances

ToBuiltin Bool BuiltinBool Source #
Instance details

Defined in PlutusTx.Builtins.Class

FromBuiltin BuiltinBool Bool Source #
Instance details

Defined in PlutusTx.Builtins.Class

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Bool
Instance details

Defined in PlutusCore.Default.Universe

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Bool
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst DefaultUni Bool => KnownTypeAst DefaultUni Bool
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Bool
Instance details

Defined in PlutusCore.Default.Universe

Typeable DefaultUni Bool Source #
Instance details

Defined in PlutusTx.Lift.Instances

MArray ( STUArray s) Bool ( ST s)
Instance details

Defined in Data.Array.Base

type Rep Bool
Instance details

Defined in GHC.Generics

newtype Vector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

type DemoteRep Bool
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
data Sing (a :: Bool )
Instance details

Defined in GHC.Generics

data Sing (a :: Bool ) where
newtype MVector s Bool
Instance details

Defined in Data.Vector.Unboxed.Base

type ToBinds Bool
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds Bool = ToBinds (ElaborateBuiltin Bool )
type ToHoles Bool
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles Bool = ToHoles (ElaborateBuiltin Bool )

(&&) :: Bool -> Bool -> Bool infixr 3 Source #

Logical AND

>>> True && False
False

(||) :: Bool -> Bool -> Bool infixr 2 Source #

Logical OR

>>> True || False
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 = ...