Matcha.Context.Common (Matcha v0.1.3) View Source

Functions and operators that any match specs can use in their bodies.

Limitations

Neither tuple_size/2 nor is_record/2 are available here, though you'd expect them to be. For various reasons, Matcha cannot support is_record/2 and erlang does not support tuple_size/2.

Defined functions

Note that this list corresponds to key functions in the :erlang module, or erlang operators, not their equivalents in Elixir's Kernel module (or the Bitwise guards). Allowed Elixir functions, operators, and macros composed of them are first expanded to erlang variants before they are looked up in this context. For example, Kernel.send/2 expands to erlang's ! operator, so is defined in this module as !/2.

Further reading

Aside from the above limitations, the common functions allowed in all match specs are just identical to those allowed in guards; so for an Elixir-ized, pre-erlang-ized expansion reference on what functions and operators you can use in any match spec, consult the docs for what is allowed in guards. For an erlang reference, see the tracing match spec docs.

Link to this section Summary

Functions

All match specs can call erlang's !/2.

All match specs can call erlang's */2.

All match specs can call erlang's +/1.

All match specs can call erlang's +/2.

All match specs can call erlang's -/1.

All match specs can call erlang's -/2.

All match specs can call erlang's //2.

All match specs can call erlang's /=/2.

All match specs can call erlang's </2.

All match specs can call erlang's =/=/2.

All match specs can call erlang's =:=/2.

All match specs can call erlang's =</2.

All match specs can call erlang's ==/2.

All match specs can call erlang's >/2.

All match specs can call erlang's >=/2.

All match specs can call erlang's abs/1.

All match specs can call erlang's and/2.

All match specs can call erlang's andalso/2.

All match specs can call erlang's band/2.

All match specs can call erlang's binary_part/2.

All match specs can call erlang's binary_part/3.

All match specs can call erlang's bit_size/1.

All match specs can call erlang's bnot/1.

All match specs can call erlang's bor/2.

All match specs can call erlang's bsl/2.

All match specs can call erlang's bsr/2.

All match specs can call erlang's bxor/2.

All match specs can call erlang's byte_size/1.

All match specs can call erlang's ceil/1.

All match specs can call erlang's div/2.

All match specs can call erlang's element/2.

All match specs can call erlang's float/1.

All match specs can call erlang's floor/1.

All match specs can call erlang's hd/1.

All match specs can call erlang's is_atom/1.

All match specs can call erlang's is_binary/1.

All match specs can call erlang's is_bitstring/1.

All match specs can call erlang's is_boolean/1.

All match specs can call erlang's is_float/1.

All match specs can call erlang's is_function/1.

All match specs can call erlang's is_function/2.

All match specs can call erlang's is_integer/1.

All match specs can call erlang's is_list/1.

All match specs can call erlang's is_map/1.

All match specs can call erlang's is_map_key/2.

All match specs can call erlang's is_number/1.

All match specs can call erlang's is_pid/1.

All match specs can call erlang's is_port/1.

All match specs can call erlang's is_record/3.

All match specs can call erlang's is_reference/1.

All match specs can call erlang's is_tuple/1.

All match specs can call erlang's length/1.

All match specs can call erlang's map_get/2.

All match specs can call erlang's map_size/1.

All match specs can call erlang's node/0.

All match specs can call erlang's node/1.

All match specs can call erlang's not/1.

All match specs can call erlang's or/2.

All match specs can call erlang's orelse/2.

All match specs can call erlang's rem/2.

All match specs can call erlang's round/1.

All match specs can call erlang's self/0.

All match specs can call erlang's size/1.

All match specs can call erlang's tl/1.

All match specs can call erlang's trunc/1.

All match specs can call erlang's xor/2.

Link to this section Functions

All match specs can call erlang's !/2.

All match specs can call erlang's */2.

All match specs can call erlang's +/1.

All match specs can call erlang's +/2.

All match specs can call erlang's -/1.

All match specs can call erlang's -/2.

All match specs can call erlang's //2.

All match specs can call erlang's /=/2.

All match specs can call erlang's </2.

All match specs can call erlang's =/=/2.

All match specs can call erlang's =:=/2.

All match specs can call erlang's =</2.

All match specs can call erlang's ==/2.

All match specs can call erlang's >/2.

All match specs can call erlang's >=/2.

All match specs can call erlang's abs/1.

All match specs can call erlang's and/2.

All match specs can call erlang's andalso/2.

All match specs can call erlang's band/2.

All match specs can call erlang's binary_part/2.

Link to this function

binary_part(arg1, arg2, arg3)

View Source

All match specs can call erlang's binary_part/3.

All match specs can call erlang's bit_size/1.

All match specs can call erlang's bnot/1.

All match specs can call erlang's bor/2.

All match specs can call erlang's bsl/2.

All match specs can call erlang's bsr/2.

All match specs can call erlang's bxor/2.

All match specs can call erlang's byte_size/1.

All match specs can call erlang's ceil/1.

All match specs can call erlang's div/2.

All match specs can call erlang's element/2.

All match specs can call erlang's float/1.

All match specs can call erlang's floor/1.

All match specs can call erlang's hd/1.

All match specs can call erlang's is_atom/1.

All match specs can call erlang's is_binary/1.

All match specs can call erlang's is_bitstring/1.

All match specs can call erlang's is_boolean/1.

All match specs can call erlang's is_float/1.

All match specs can call erlang's is_function/1.

All match specs can call erlang's is_function/2.

All match specs can call erlang's is_integer/1.

All match specs can call erlang's is_list/1.

All match specs can call erlang's is_map/1.

All match specs can call erlang's is_map_key/2.

All match specs can call erlang's is_number/1.

All match specs can call erlang's is_pid/1.

All match specs can call erlang's is_port/1.

Link to this function

is_record(arg1, arg2, arg3)

View Source

All match specs can call erlang's is_record/3.

All match specs can call erlang's is_reference/1.

All match specs can call erlang's is_tuple/1.

All match specs can call erlang's length/1.

All match specs can call erlang's map_get/2.

All match specs can call erlang's map_size/1.

All match specs can call erlang's node/0.

All match specs can call erlang's node/1.

All match specs can call erlang's not/1.

All match specs can call erlang's or/2.

All match specs can call erlang's orelse/2.

All match specs can call erlang's rem/2.

All match specs can call erlang's round/1.

All match specs can call erlang's self/0.

All match specs can call erlang's size/1.

All match specs can call erlang's tl/1.

All match specs can call erlang's trunc/1.

All match specs can call erlang's xor/2.