Bits (Booleans)
Type signatures are provisional and may contain errors.
Sire has an incomplete type system. No type checks are enforced at this point. Type signatures are provided for the intended behavior.
Constants
TRUE
Represents the boolean value true.
TRUE == 1FALSE
Represents the boolean value false.
FALSE == 0Conditionals
if
(if x t e)
> x : Bool
> t : a
> e : a
> aConditional operation. If the condition is true (non-zero), returns the second argument, otherwise returns the third argument.
ifNot
Inverted conditional. If the condition is false (zero), returns the second argument, otherwise returns the third argument.
ifz
Conditional based on zero. If the first argument is zero, returns the second argument, otherwise returns the third argument.
ifNonZero
Conditional based on non-zero. If the first argument is non-zero, returns the second argument, otherwise returns the third argument.
else
Identity function, used to improve readability in conditional expressions.
Bit Operations
bit
Converts a value to a bit (0 or 1).
not
Logical NOT operation.
and
Logical AND operation.
or
Logical OR operation.
xor
Logical XOR (exclusive OR) operation.
nand
Logical NAND (NOT AND) operation.
nor
Logical NOR (NOT OR) operation.
xnor
Logical XNOR (NOT XOR) operation.
Last updated