View Source Drops.Types.Union (drops v0.2.1)
Drops.Types.Union is a struct that represents a union type with left and right types.
Examples
iex> Drops.Type.Compiler.visit([{:type, {:string, []}}, {:type, {:integer, []}}], [])
%Drops.Types.Union{
left: %Drops.Types.Primitive{
primitive: :string,
constraints: [predicate: {:type?, :string}]
},
right: %Drops.Types.Primitive{
primitive: :integer,
constraints: [predicate: {:type?, :integer}]
},
opts: []
}