erl_internal (stdlib v3.15.2)

This module defines Erlang BIFs, guard tests, and operators. This module is only of interest to programmers who manipulate Erlang code.

Link to this section Summary

Functions

Adds to Forms the code for the standard pre-defined functions (such as module_info/0) that are to be included in every module.

Returns true if OpName/Arity is an arithmetic operator, otherwise false.

Returns true if Name/Arity is an Erlang BIF that is automatically recognized by the compiler, otherwise false.

Returns true if OpName/Arity is a Boolean operator, otherwise false.

Returns true if OpName/Arity is a comparison operator, otherwise false.

Returns true if Name/Arity is an Erlang BIF that is allowed in guards, otherwise false.

Returns true if OpName/Arity is a list operator, otherwise false.

Returns the Type of operator that OpName/Arity belongs to, or generates a function_clause error if it is not an operator.

Returns true if OpName/Arity is a send operator, otherwise false.

Returns true if Name/Arity is a valid Erlang type test, otherwise false.

Link to this section Functions

Link to this function

add_predefined_functions/1

(since OTP 20.0)

Specs

add_predefined_functions(Forms) -> UpdatedForms
                            when
                                Forms :: [erl_parse:abstract_form() | erl_parse:form_info()],
                                UpdatedForms ::
                                    [erl_parse:abstract_form() | erl_parse:form_info()].

Adds to Forms the code for the standard pre-defined functions (such as module_info/0) that are to be included in every module.

Specs

arith_op(OpName, Arity) -> boolean() when OpName :: atom(), Arity :: arity().

Returns true if OpName/Arity is an arithmetic operator, otherwise false.

Specs

bif(Name, Arity) -> boolean() when Name :: atom(), Arity :: arity().

Returns true if Name/Arity is an Erlang BIF that is automatically recognized by the compiler, otherwise false.

Specs

bool_op(OpName, Arity) -> boolean() when OpName :: atom(), Arity :: arity().

Returns true if OpName/Arity is a Boolean operator, otherwise false.

Specs

comp_op(OpName, Arity) -> boolean() when OpName :: atom(), Arity :: arity().

Returns true if OpName/Arity is a comparison operator, otherwise false.

Specs

guard_bif(Name, Arity) -> boolean() when Name :: atom(), Arity :: arity().

Returns true if Name/Arity is an Erlang BIF that is allowed in guards, otherwise false.

Specs

list_op(OpName, Arity) -> boolean() when OpName :: atom(), Arity :: arity().

Returns true if OpName/Arity is a list operator, otherwise false.

Specs

op_type(OpName, Arity) -> Type
           when OpName :: atom(), Arity :: arity(), Type :: arith | bool | comp | list | send.

Returns the Type of operator that OpName/Arity belongs to, or generates a function_clause error if it is not an operator.

Specs

send_op(OpName, Arity) -> boolean() when OpName :: atom(), Arity :: arity().

Returns true if OpName/Arity is a send operator, otherwise false.

Specs

type_test(Name, Arity) -> boolean() when Name :: atom(), Arity :: arity().

Returns true if Name/Arity is a valid Erlang type test, otherwise false.