View Source TypeCheck.Builtin.None (TypeCheck v0.13.5)

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

Types

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

t()

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

Link to this section Types

@type problem_tuple() :: {t(), :no_match, %{}, val :: any()}

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

Full definition:

problem_tuple :: {t(), :no_match, %{}, val :: any()}
@type 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{}