Skip to main content
Version: 1.5.0

assert

module error

let assert: (_: bool) => unit

The call assert(cond) terminates the execution with the string "failed assertion" if, and only if, the boolean condition cond is false.

let some: <a>(_: option<a>) => unit

The call some(opt) terminates the execution with the string "failed assert some" if, and only if, opt is None().

let none: <a>(_: option<a>) => unit

The call none(opt) terminates the execution with the string "failed assert none" if, and only if, opt is not None().