re.erl
does define the mp/0
type, but since there is no -export_type
declaration (described in the docs here), it is not available to other modules. (See also this Github issue)
To make the type re:mp()
available, you'd need to add -export_type
there.
In fact, there is a pull request that does that. So most likely this will work correctly once Erlang/OTP 27 is released.