plutus-tx-0.1.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 #

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

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () Source #

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

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 #

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

Methods

pretty :: Bool -> Doc b Source #

prettyList :: [Bool] -> Doc b 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

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 #

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

Methods

prettyBy :: config -> Bool -> Doc ann Source #

prettyListBy :: config -> [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

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

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

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Bool -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Bool Source #

KnownBuiltinTypeAst DefaultUni Bool => KnownTypeAst DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Bool :: [Hole] Source #

type ToBinds Bool :: [Some TyNameRep] Source #

Methods

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

Contains DefaultUni Bool 
Instance details

Defined in PlutusCore.Default.Universe

Typeable DefaultUni Bool Source # 
Instance details

Defined in PlutusTx.Lift.Instances

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

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