elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Set-theoretic tuple types

Open gldubc opened this issue 1 year ago • 0 comments

Adds to the Descr tuple types {:ok, binary(), integer()} and open tuple types {atom(), boolean(), ...} which represent every tuple of at least two elements that are an atom and a boolean.

Tuples are encoded as map records, where the keys are the indices. E.g., type {integer(), atom()} is encoded as type %{0 => integer(), 1 => atom()} and {atom(), boolean(), ...} is encoded as the open map %{..., 0 => atom(), 1 => boolean()}.

Emptiness checking is slightly modified to account for the fact that tuple types do not admit explicit optional indices.

gldubc avatar May 20 '24 16:05 gldubc