Loading...
Searching...
No Matches
bool.h
Go to the documentation of this file.
#ifndef ML99_BOOL_H
#define ML99_BOOL_H
#include <metalang99/priv/bool.h>
#include <metalang99/priv/tuple.h>
#include <metalang99/lang.h>
#define ML99_true(...) ML99_callUneval(ML99_true, )
#define ML99_false(...) ML99_callUneval(ML99_false, )
#define ML99_not(x) ML99_call(ML99_not, x)
#define ML99_and(x, y) ML99_call(ML99_and, x, y)
#define ML99_or(x, y) ML99_call(ML99_or, x, y)
#define ML99_xor(x, y) ML99_call(ML99_xor, x, y)
#define ML99_boolEq(x, y) ML99_call(ML99_boolEq, x, y)
#define ML99_boolMatch(x, matcher) ML99_call(ML99_boolMatch, x, matcher)
#define ML99_boolMatchWithArgs(x, matcher, ...) \
ML99_call(ML99_boolMatchWithArgs, x, matcher, __VA_ARGS__)
#define ML99_if(cond, x, y) ML99_call(ML99_if, cond, x, y)
#define ML99_IF(cond, x, y) ML99_PRIV_UNTUPLE(ML99_PRIV_IF(cond, (x), (y)))
#define ML99_TRUE(...) 1
#define ML99_FALSE(...) 0
#define ML99_NOT(x) ML99_PRIV_NOT(x)
#define ML99_AND(x, y) ML99_PRIV_AND(x, y)
#define ML99_OR(x, y) ML99_PRIV_OR(x, y)
#define ML99_XOR(x, y) ML99_PRIV_XOR(x, y)
#define ML99_BOOL_EQ(x, y) ML99_PRIV_BOOL_EQ(x, y)
#ifndef DOXYGEN_IGNORE
#define ML99_true_IMPL(...) v(ML99_TRUE())
#define ML99_false_IMPL(...) v(ML99_FALSE())
#define ML99_not_IMPL(x) v(ML99_NOT(x))
#define ML99_and_IMPL(x, y) v(ML99_AND(x, y))
#define ML99_or_IMPL(x, y) v(ML99_OR(x, y))
#define ML99_xor_IMPL(x, y) v(ML99_XOR(x, y))
#define ML99_boolEq_IMPL(x, y) v(ML99_BOOL_EQ(x, y))
#define ML99_boolMatch_IMPL(x, matcher) ML99_callUneval(matcher##x, )
#define ML99_boolMatchWithArgs_IMPL(x, matcher, ...) ML99_callUneval(matcher##x, __VA_ARGS__)
#define ML99_if_IMPL(cond, x, y) v(ML99_PRIV_IF(cond, x, y))
// Arity specifiers {
#define ML99_true_ARITY 1
#define ML99_false_ARITY 1
#define ML99_not_ARITY 1
#define ML99_and_ARITY 2
#define ML99_or_ARITY 2
#define ML99_xor_ARITY 2
#define ML99_boolEq_ARITY 2
#define ML99_boolMatch_ARITY 2
#define ML99_boolMatchWithArgs_ARITY 3
#define ML99_if_ARITY 3
// } (Arity specifiers)
#endif // DOXYGEN_IGNORE
#endif // ML99_BOOL_H
lang.h
The core metalanguage.