tagged v0.1.0 Tagged.Typedef View Source
Generates type definitions for tagged value tuples.
This module is executed by default, but can be disabled with type: false
as keyword argument for either defmacro
or use Tagged
.
Examples
Disable type declaration for all tagged value tuple definitions
defmodule NoTypes do use Tagged, type: false deftagged foo end _iex> use NoTypes _iex> t NoTypes.foo No type information for NoTypes.foo was found or NoTypes.foo is private
Override type declaration for a single tagged value tuple definition
defmodule SomeTypes do use Tagged deftagged foo, type: false deftagged bar end _iex> use Types _iex> t NoTypes.foo No type information for NoTypes.foo was found or NoTypes.foo is private _iex> t NoTypes.bar @type bar() :: {:bar, term()} Tagged value tuple, containing term().