TypeCheck v0.2.0 TypeCheck.Builtin.None View Source
The 'none' type has no inhabitants. In other words, no value will typecheck against this type.
This means that we always return a problem tuple with :no_match
as reason in its check.
It also means that the StreamData-generator will not generate any values;
instead, it will filter away values that would have been produced by none()
,
meaning that if you attempt to use none()
directly in a generator, you might get a StreamData.FilterTooNarrowError
.
However, it's still possible to combine it with other types like :ok | :error | none()
and e.g. use the resulting generator of that.
Link to this section Summary
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 :: {t(), :no_match, %{}, val :: any()}
Specs
t() :: %TypeCheck.Builtin.None{}
This type is managed by TypeCheck
,
which allows checking values against the type at runtime.
Full definition:
t :: %TypeCheck.Builtin.None{}