ElixirST.TypeOperations (ElixirST v0.6.3) View Source

Operations related to expression typing.

Link to this section Summary

Functions

Returns a list of all accepted types, including :number, :atom, ...

Process types in @spec format and returns usable types.

Returns the name of the quoted variable or nil in case of an underscore at the beginning.

Link to this section Functions

Specs

accepted_types() :: [atom()]

Returns a list of all accepted types, including :number, :atom, ...

Specs

equal?(any(), any()) :: boolean()

Specs

get_type(any()) :: atom() | {:list, any()} | {:tuple, list()} | list()

Process types in @spec format and returns usable types.

Accepts: any, atom, binary, boolean, nil, number, pid, string, no_return, list and tuple The type of variables is returned if the environment contains the corresponding type of variable.

Specs

get_type(any(), %{}) :: atom() | {:list, any()} | {:tuple, list()} | list()

Specs

get_var(any()) :: any()

Returns the name of the quoted variable or nil in case of an underscore at the beginning.

Specs

type_to_guard(binary()) :: :error | binary()

Specs

typeof(atom() | binary() | boolean() | :error | nil | number() | pid()) ::
  :atom | :binary | :boolean | :error | nil | :number | :pid
Link to this function

var_pattern(params, param_type_list)

View Source