plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

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

Methods

(==) :: Bool -> Bool -> Bool Source #

(/=) :: Bool -> Bool -> Bool Source #

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 #

Methods

from :: Bool -> Rep Bool x Source #

to :: Rep Bool x -> Bool Source #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () Source #

Serialise Bool 
Instance details

Defined in Codec.Serialise.Class

Methods

encode :: Bool -> Encoding

decode :: Decoder s Bool

encodeList :: [Bool] -> Encoding

decodeList :: Decoder s [Bool]

FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Bool

parseJSONList :: Value -> Parser [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

ToJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Bool

toJSONKeyList :: ToJSONKeyFunction [Bool]

Pretty Bool 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Bool -> Doc ann

prettyList :: [Bool] -> Doc ann

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int

hash :: Bool -> Int

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

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

Pretty Bool 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

pretty :: Bool -> Doc b

prettyList :: [Bool] -> Doc b

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

ExMemoryUsage Bool 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

memoryUsage :: Bool -> ExMemory

Eq Bool Source # 
Instance details

Defined in PlutusTx.Eq

Methods

(==) :: Bool -> Bool -> Bool Source #

Ord Bool Source # 
Instance details

Defined in PlutusTx.Ord

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 #

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 #

BoundedMeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top :: Bool Source #

BoundedJoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom :: Bool Source #

MeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(/\) :: Bool -> Bool -> Bool Source #

JoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(\/) :: Bool -> Bool -> Bool Source #

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

Methods

lift :: Bool -> Q Exp Source #

liftTyped :: Bool -> Q (TExp Bool) Source #

IArray UArray Bool 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Bool -> (i, i) Source #

numElements :: Ix i => UArray i Bool -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Bool)] -> UArray i Bool

unsafeAt :: Ix i => UArray i Bool -> Int -> Bool

unsafeReplace :: Ix i => UArray i Bool -> [(Int, Bool)] -> UArray i Bool

unsafeAccum :: Ix i => (Bool -> e' -> Bool) -> UArray i Bool -> [(Int, e')] -> UArray i Bool

unsafeAccumArray :: Ix i => (Bool -> e' -> Bool) -> Bool -> (i, i) -> [(Int, e')] -> UArray i Bool

PrettyDefaultBy config Bool => PrettyBy config Bool 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Bool -> Doc ann

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

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

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Bool -> m (Vector Bool)

basicUnsafeThaw :: PrimMonad m => Vector Bool -> m (Mutable Vector (PrimState m) Bool)

basicLength :: Vector Bool -> Int

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

basicUnsafeIndexM :: Monad m => Vector Bool -> Int -> m Bool

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Bool -> Vector Bool -> m ()

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 :: PrimMonad m => Int -> m (MVector (PrimState m) Bool)

basicInitialize :: PrimMonad m => MVector (PrimState m) Bool -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Bool -> m (MVector (PrimState m) Bool)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m Bool

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Bool -> Int -> Bool -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Bool -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Bool -> Bool -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m (MVector (PrimState m) Bool)

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

Methods

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

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

Methods

makeKnown :: Maybe cause -> Bool -> MakeKnownM cause term

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: Maybe cause -> term -> ReadKnownM cause Bool

Contains DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Bool)

KnownBuiltinTypeAst DefaultUni Bool => KnownTypeAst DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Bool :: [Hole]

type ToBinds Bool :: [Some TyNameRep]

Methods

toTypeAst :: proxy Bool -> Type TyName DefaultUni ()

Typeable DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

Methods

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

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

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Bool -> ST s (i, i) Source #

getNumElements :: Ix i => STUArray s i Bool -> ST s Int

newArray :: Ix i => (i, i) -> Bool -> ST s (STUArray s i Bool) Source #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Bool) Source #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Bool)

unsafeRead :: Ix i => STUArray s i Bool -> Int -> ST s Bool

unsafeWrite :: Ix i => STUArray s i Bool -> Int -> Bool -> ST s ()

type Rep Bool 
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))
newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Bool = V_Bool (Vector Word8)
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

newtype MVector s Bool = MV_Bool (MVector s Word8)
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 = ...