Witchcraft.Unit (Witchcraft v1.0.4) View Source

The unit or Void type. A stand in for "no added information here".

Why not encode unit as {}? Many protocols (Witchcraft and others) convert tuples to lists, and thus will treat unit as {} and thus [], which we don't want. The struct removes this ambiguity.

Link to this section Summary

Functions

Helper to summon the singleton Unit struct

Link to this section Types

Specs

t() :: %Witchcraft.Unit{}

Link to this section Functions

Specs

new() :: t()

Helper to summon the singleton Unit struct