plutus-tx-1.36.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

Methods

parseJSON :: Value -> Parser Bool

parseJSONList :: Value -> Parser [Bool]

omittedField :: Maybe Bool

FromJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Bool

fromJSONKeyList :: FromJSONKeyFunction [Bool]

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Bool -> Value

toEncoding :: Bool -> Encoding

toJSONList :: [Bool] -> Value

toEncodingList :: [Bool] -> Encoding

omitField :: Bool -> Bool

ToJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Bool

toJSONKeyList :: ToJSONKeyFunction [Bool]

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 #

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 :: forall (a :: Bool). Sing a -> DemoteRep Bool

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

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

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () 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

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int

hash :: Bool -> Int

HasBlueprintDefinition Bool Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Bool :: [Type] Source #

HasToBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type ToBuiltin Bool Source #

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

Show Bool Source # 
Instance details

Defined in PlutusTx.Show

Pretty Bool 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Bool -> Doc ann

prettyList :: [Bool] -> Doc ann

Uniform Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Bool

UniformRange Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Bool, Bool) -> g -> m Bool

Serialise Bool 
Instance details

Defined in Codec.Serialise.Class

Methods

encode :: Bool -> Encoding

decode :: Decoder s Bool

encodeList :: [Bool] -> Encoding

decodeList :: Decoder s [Bool]

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 BuiltinBool Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque Bool BuiltinBool Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Lift DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

lift :: Bool -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

DefaultPrettyBy config Bool 
Instance details

Defined in Text.PrettyBy.Internal

Methods

defaultPrettyBy :: config -> Bool -> Doc ann

defaultPrettyListBy :: config -> [Bool] -> Doc ann

NonDefaultPrettyBy ConstConfig Bool 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

nonDefaultPrettyBy :: ConstConfig -> Bool -> Doc ann

nonDefaultPrettyListBy :: ConstConfig -> [Bool] -> Doc ann

PrettyDefaultBy config Bool => PrettyBy config Bool 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Bool -> Doc ann

prettyListBy :: config -> [Bool] -> Doc ann

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Bool -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool Source #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Bool -> ST s (Vector Bool)

basicUnsafeThaw :: Vector Bool -> ST s (Mutable Vector s Bool)

basicLength :: Vector Bool -> Int

basicUnsafeSlice :: Int -> Int -> Vector Bool -> Vector Bool

basicUnsafeIndexM :: Vector Bool -> Int -> Box Bool

basicUnsafeCopy :: Mutable Vector s Bool -> Vector Bool -> ST s ()

elemseq :: Vector Bool -> Bool -> b -> b

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Bool -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Bool -> MVector s Bool

basicOverlaps :: MVector s Bool -> MVector s Bool -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Bool)

basicInitialize :: MVector s Bool -> ST s ()

basicUnsafeReplicate :: Int -> Bool -> ST s (MVector s Bool)

basicUnsafeRead :: MVector s Bool -> Int -> ST s Bool

basicUnsafeWrite :: MVector s Bool -> Int -> Bool -> ST s ()

basicClear :: MVector s Bool -> ST s ()

basicSet :: MVector s Bool -> Bool -> ST s ()

basicUnsafeCopy :: MVector s Bool -> MVector s Bool -> ST s ()

basicUnsafeMove :: MVector s Bool -> MVector s Bool -> ST s ()

basicUnsafeGrow :: MVector s Bool -> Int -> ST s (MVector s Bool)

KnownBuiltinTypeIn DefaultUni term Bool => MakeKnownIn DefaultUni term Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Bool -> BuiltinResult term

KnownBuiltinTypeIn DefaultUni term Bool => ReadKnownIn DefaultUni term Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: term -> ReadKnownM Bool

Contains DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Bool)

Typeable DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

typeRep :: Proxy Bool -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

KnownBuiltinTypeAst tyname DefaultUni Bool => KnownTypeAst tyname DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni Bool :: Bool

type ToHoles DefaultUni Bool :: [Hole]

type ToBinds DefaultUni acc Bool :: [Some TyNameRep]

Methods

typeAst :: Type tyname DefaultUni ()

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 ToBuiltin Bool Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Bool = V_Bool (Vector Word8)
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 IsBuiltin DefaultUni Bool = IsBuiltin DefaultUni (ElaborateBuiltin DefaultUni Bool)
type ToHoles DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

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

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Bool = ToBinds DefaultUni acc (ElaborateBuiltin DefaultUni Bool)

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

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

>>> True && False
False

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

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

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