Types

group types

Defines

_CONCAT2(X, Y)
CONCAT2(X, Y)
_CONCAT3(X, Y, Z)
CONCAT3(X, Y, Z)
ml_assert(CONDITION)
ML_DEF(NAME)
ml_default_deref
ML_TYPE_INIT(CONSTRUCTOR, PARENTS, NAME, ...)
ML_TYPE(TYPE, PARENTS, NAME, ...)
ML_INTERFACE(TYPE, PARENTS, NAME, ...)
ML_UNION_TYPE(TYPE, ...)
ML_TYPE_ARG(N)
ml_call(CALLER, VALUE, COUNT, ARGS)
ml_inline(STATE, VALUE, COUNT, ARGS...)
ml_assign(CALLER, VALUE, VALUE2)
ML_TYPED_FN(FUNCTION, TYPE, ARGS...)
ML_VALUE(NAME, TYPE)

Typedefs

typedef struct ml_value_t ml_value_t
typedef struct ml_type_t ml_type_t
typedef struct ml_context_t ml_context_t
typedef struct ml_state_t ml_state_t
typedef struct ml_hash_chain_t ml_hash_chain_t
typedef ml_value_t *(*ml_callback_t)(void *Data, int Count, ml_value_t **Args)
typedef void (*ml_callbackx_t)(ml_state_t *Caller, void *Data, int Count, ml_value_t **Args)
typedef int (*ml_value_find_fn)(void *Data, ml_value_t *Value, int HasRefs)

Functions

long ml_default_hash(ml_value_t *Value, ml_hash_chain_t *Chain)
void ml_default_call(ml_state_t *Frame, ml_value_t *Value, int Count, ml_value_t **Args)
void ml_default_assign(ml_state_t *Caller, ml_value_t *Ref, ml_value_t *Value)
long ml_type_hash(ml_type_t *Type)
void ml_type_call(ml_state_t *Caller, ml_type_t *Type, int Count, ml_value_t **Args)
void ml_type_init(ml_type_t *Type, ...) __attribute__((sentinel))
ml_type_t *ml_type(ml_type_t *Parent, const char *Name)
static inline const char *ml_type_name(const ml_type_t *Value)
void ml_type_add_parent(ml_type_t *Type, ml_type_t *Parent)
ml_type_t *ml_union_type(int NumTypes, ml_type_t *Types[])
void ml_type_add_rule(ml_type_t *Type, ml_type_t *Parent, ...) __attribute__((sentinel))
int ml_is_subtype(ml_type_t *Type1, ml_type_t *Type2) __attribute__((pure))
ml_type_t *ml_type_max(ml_type_t *Type1, ml_type_t *Type2)
static inline ml_type_t *ml_typeof(const ml_value_t *Value)
static inline ml_value_t *ml_deref(ml_value_t *Value)
static inline ml_type_t *ml_typeof_deref(ml_value_t *Value)
static inline int ml_is(const ml_value_t *Value, const ml_type_t *Expected)
long ml_hash_chain(ml_value_t *Value, ml_hash_chain_t *Chain)
static inline long ml_hash(ml_value_t *Value)
void *ml_typed_fn_get(ml_type_t *Type, void *TypedFn)
void ml_typed_fn_set(ml_type_t *Type, void *TypedFn, void *Function)
void ml_value_set_name(ml_value_t *Value, const char *Name)
void ml_value_find_all(ml_value_t *Value, void *Data, ml_value_find_fn RefFn)
int ml_value_is_constant(ml_value_t *Value)

Variables

ml_type_t MLTypeT[]
ml_type_t MLTypeUnionT[]
ml_type_t MLVisitorT[]
ml_type_t MLAnyT[]
ml_type_t MLNilT[]
ml_type_t MLSomeT[]
ml_type_t MLBlankT[]
ml_value_t MLNil[]
ml_value_t MLSome[]
ml_value_t MLBlank[]
struct ml_value_t
struct ml_hash_chain_t
struct ml_type_t
struct ml_visitor_t