Booleans [001W]

The \mathsf {Bool} type is standard, with values \mathsf {true} and \mathsf {false}; no special capabilities are needed to use Boolean values themselves.

The eliminator for \mathsf {Bool} values is a built-in function \mathsf {if} with type \mathsf {if} : \forall \alpha .\; \{\mathsf {Exc}(\mathsf {if})\} \Rightarrow \mathsf {Bool} \to \mathsf {Delay}^{\delta _1}\;\alpha \to \mathsf {Delay}^{\delta _2}\;\alpha \xrightarrow {\delta _1 \cup \delta _2} \alpha This says that \mathsf {if} takes a boolean value and two delayed expressions of the same type \alpha , and produces a value of type \alpha . It also tells us that evaluating the constant \mathsf {if} itself requires capability \mathsf {Exc}(\mathsf {if}), and that evaluating its full application to a boolean and two delayed expressions requires capabilities \delta _1 \cup \delta _2—whatever capabilities are required to evaluate the two branches. Of course, only one of \delta _1 or \delta _2 will actually be needed, but since we can't know which until runtime, we must conservatively require their union.