ityonemo/mavis

make it possible for there to be an internal type, `String.t/1`

Closed this issue · 2 comments

this type has arity 1 and the value inside the arity is the length of the string, and corresponds to the byte-size of the string, and is only activated for constant-size strings that are defined at compile time.

I think it's possible for this to exist internally inside of mavis without interfering with anything else that elixir or dialyzer does. It's important to keep the String annotation because we want a way to "slyly" specify that a value is a UTF-8 encoded binary.

Also consider allowing a user to turn this off with a configuration flag.

completed here 419154d