|
Metalang99 1.13.3
Full-blown preprocessor metaprogramming
|
A choice type with two cases. More...

Go to the source code of this file.
Macros | |
| #define | ML99_left(x) ML99_call(ML99_left, x) |
The left value x. | |
| #define | ML99_right(x) ML99_call(ML99_right, x) |
The right value x. | |
| #define | ML99_isLeft(either) ML99_call(ML99_isLeft, either) |
ML99_true() if either contains a left value, otherwise ML99_false(). | |
| #define | ML99_isRight(either) ML99_call(ML99_isRight, either) |
| The inverse of ML99_isLeft. | |
| #define | ML99_eitherEq(cmp, either, other) ML99_call(ML99_eitherEq, cmp, either, other) |
Tests either and other for equality. | |
| #define | ML99_unwrapLeft(either) ML99_call(ML99_unwrapLeft, either) |
Returns the left value on ML99_left(x) or emits a fatal error on ML99_right(y). | |
| #define | ML99_unwrapRight(either) ML99_call(ML99_unwrapRight, either) |
| The inverse of ML99_unwrapLeft. | |
| #define | ML99_LEFT(x) ML99_CHOICE(left, x) |
| #define | ML99_RIGHT(x) ML99_CHOICE(right, x) |
| #define | ML99_IS_LEFT(either) ML99_PRIV_IS_LEFT(either) |
| #define | ML99_IS_RIGHT(either) ML99_NOT(ML99_IS_LEFT(either)) |
A choice type with two cases.
| #define ML99_eitherEq | ( | cmp, | |
| either, | |||
| other | |||
| ) | ML99_call(ML99_eitherEq, cmp, either, other) |
Tests either and other for equality.
| #define ML99_isLeft | ( | either | ) | ML99_call(ML99_isLeft, either) |
ML99_true() if either contains a left value, otherwise ML99_false().
| #define ML99_isRight | ( | either | ) | ML99_call(ML99_isRight, either) |
| #define ML99_unwrapLeft | ( | either | ) | ML99_call(ML99_unwrapLeft, either) |
Returns the left value on ML99_left(x) or emits a fatal error on ML99_right(y).
| #define ML99_unwrapRight | ( | either | ) | ML99_call(ML99_unwrapRight, either) |
The inverse of ML99_unwrapLeft.