Module Relude_Bool

Relude.Bool contains typeclass instances and utility functions for working with the bool type.

let ifElse: (unit => 'a) => (unit => 'a) => bool => 'a;

Folds a bool value into a value of a different type, using a function for the true and false cases.

Bool.ifElse(() => "yes", () => "no", true) == "yes";
Bool.ifElse(() => "yes", () => "no", false) == "no";
let inverse: bool => bool;

Bool.inverse negates the boolean.

This function isn't named not, because refmt would rewrite it as (!).

let not__: bool => bool;

Bool.not_ is an alias for inverse.

let and_: bool => bool => bool;

Combines two boolean using an AND

let or_: bool => bool => bool;

Combines two boolean using an OR

let nand: bool => bool => bool;

Combines two booleans using an NAND

let nor: bool => bool => bool;

Combines two booleans using an NOR

let xor: bool => bool => bool;

Combines two booleans using an XOR

let xnor: bool => bool => bool;

Combines two booleans using an XNOR

let implies: bool => bool => bool;

Combines two booleans using an implication

let eq: bool => bool => bool;

Compares two booleans for equality

module Eq: BsBastet.Interface.EQ with type Eq.t = bool;

EQ instance for booleans

let compare: bool => bool => BsBastet.Interface.ordering;

Compares two booleans for equality

module Ord: BsBastet.Interface.ORD with type Ord.t = bool;

ORD instance for booleans

let show: bool => string;

Converts a boolean value to a string

module Show: BsBastet.Interface.SHOW with type Show.t = bool;

SHOW instance for booleans

module Conjunctive: { ... };
module And = Conjunctive;
module Disjunctive: { ... };
module Or = Disjunctive;
module Bounded: BsBastet.Interface.BOUNDED with type Bounded.t = bool;
include { ... };
module Enum: Relude_Interface.ENUM with type Enum.t = bool;
include { ... };
let fromToAsList: start:Enum.t => finish:Enum.t => list(Enum.t);
let upFromAsList: Enum.t => list(Enum.t);
let upFromIncludingAsList: Enum.t => list(Enum.t);
let downFromAsList: Enum.t => list(Enum.t);
let downFromIncludingAsList: Enum.t => list(Enum.t);
module BoundedEnum: Relude_Interface.BOUNDED_ENUM with type BoundedEnum.t = bool;
include { ... };
let fromThenToAsList: start:BoundedEnum.t => next:BoundedEnum.t => finish:BoundedEnum.t => list(BoundedEnum.t);
module Infix: { ... };