This is what I would ideally like to go for, but using a macro. The macro would convert this “type” to a tuple, and then Dialyzer would be able to pick up miss matches.
I understand the pattern of NewType as is commonly defined is mostly applicable to static languages, but that does not mean we can not learn good lessons from it and adapt to Elixir, in a way that accomplishes the same