TypeCheck v0.2.0 TypeCheck.TypeError.Formatter behaviour View Source

Behaviour to format your own type errors

Link to this section Summary

Types

This type is managed by TypeCheck, which allows checking values against the type at runtime.

Callbacks

A formatter is expected to turn a problem_tuple into a string that can be used as :message of the TypeCheck.TypeError exception.

Link to this section Types

Specs

This type is managed by TypeCheck, which allows checking values against the type at runtime.

Full definition:

problem_tuple :: TypeCheck.Builtin.Any.problem_tuple() | TypeCheck.Builtin.Atom.problem_tuple() | TypeCheck.Builtin.Binary.problem_tuple() | TypeCheck.Builtin.Bitstring.problem_tuple() | TypeCheck.Builtin.Boolean.problem_tuple() | TypeCheck.Builtin.FixedList.problem_tuple() | TypeCheck.Builtin.FixedMap.problem_tuple() | TypeCheck.Builtin.FixedTuple.problem_tuple() | TypeCheck.Builtin.Float.problem_tuple() | TypeCheck.Builtin.Integer.problem_tuple() | TypeCheck.Builtin.List.problem_tuple() | TypeCheck.Builtin.Literal.problem_tuple() | TypeCheck.Builtin.Map.problem_tuple() | TypeCheck.Builtin.NamedType.problem_tuple() | TypeCheck.Builtin.NegInteger.problem_tuple() | TypeCheck.Builtin.NonNegInteger.problem_tuple() | TypeCheck.Builtin.None.problem_tuple() | TypeCheck.Builtin.Number.problem_tuple() | TypeCheck.Builtin.PosInteger.problem_tuple() | TypeCheck.Builtin.Range.problem_tuple() | TypeCheck.Builtin.Tuple.problem_tuple()

Link to this section Callbacks

Specs

format(problem_tuple()) :: String.t()

A formatter is expected to turn a problem_tuple into a string that can be used as :message of the TypeCheck.TypeError exception.