Metalang99 1.13.3
Full-blown preprocessor metaprogramming
|
An optional value. More...
Go to the source code of this file.
Macros | |
#define | ML99_just(x) ML99_call(ML99_just, x) |
Some value x . | |
#define | ML99_nothing(...) ML99_callUneval(ML99_nothing, ) |
No value. | |
#define | ML99_isJust(maybe) ML99_call(ML99_isJust, maybe) |
ML99_true() if maybe contains some value, otherwise ML99_false() . More... | |
#define | ML99_isNothing(maybe) ML99_call(ML99_isNothing, maybe) |
The inverse of ML99_isJust. More... | |
#define | ML99_maybeEq(cmp, maybe, other) ML99_call(ML99_maybeEq, cmp, maybe, other) |
Tests maybe and other for equality. More... | |
#define | ML99_maybeUnwrap(maybe) ML99_call(ML99_maybeUnwrap, maybe) |
Returns the contained value on ML99_just(x) or emits a fatal error on ML99_nothing() . More... | |
#define | ML99_JUST(x) ML99_CHOICE(just, x) |
#define | ML99_NOTHING(...) ML99_CHOICE(nothing, ~) |
#define | ML99_IS_JUST(maybe) ML99_PRIV_IS_JUST(maybe) |
#define | ML99_IS_NOTHING(maybe) ML99_NOT(ML99_IS_JUST(maybe)) |
An optional value.
#define ML99_isJust | ( | maybe | ) | ML99_call(ML99_isJust, maybe) |
ML99_true()
if maybe
contains some value, otherwise ML99_false()
.
#define ML99_isNothing | ( | maybe | ) | ML99_call(ML99_isNothing, maybe) |
#define ML99_maybeEq | ( | cmp, | |
maybe, | |||
other | |||
) | ML99_call(ML99_maybeEq, cmp, maybe, other) |
Tests maybe
and other
for equality.
#define ML99_maybeUnwrap | ( | maybe | ) | ML99_call(ML99_maybeUnwrap, maybe) |
Returns the contained value on ML99_just(x)
or emits a fatal error on ML99_nothing()
.