query
On this page

warnIfNot

lib.warnIfNot

Docs pulled from | This Revision | about 2 hours ago


warnIfNot condition message value

Like warnIf, but negated: warn if the first argument is false.

Inputs

condition

false to trigger the warning before continuing with val.

message

Warning message to print before evaluating value.

value

Value to return as-is.

Type

Boolean -> String -> a -> a
(lib.trivial.warnIfNot)

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

warnIfNot = cond: msg: if cond then x: x else warn msg;