Well, can't you simply do
-type my_fun_type() -> fun((req()) -> req()) | other_type.
?
--
Francesco * Often in error, never in doubt
This doesn't show the relationship between the input and output, and I
get many warnings in one case if I do that (probably due to req() being
an opaque type).
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
It definitely shows that the return type and the argument's type are the same.
> and I get many warnings in one case if I do that (probably due to req() being
> an opaque type).
That is weird, which warnings? Do you mean when type checking your code or for
the declaration? I would expect the two declaration to be equivalent, but maybe
there are subtleties.
--
Francesco * Often in error, never in doubt