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

PlutusTx.Bool

Synopsis

Documentation

data Bool #

Constructors

False 
True 

Instances

Instances details
Pretty Bool
>>> pretty True
True
Instance details

Defined in PrettyBy config Bool

>>> prettyBy () True
True
Instance details

Defined in DefaultUni Bool)

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

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

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

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

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

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

not :: Bool -> Bool #

Logical negation

>>> not True
False 

otherwise :: Bool #

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

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