[erlang-questions] Fun type specifications

Francesco Mazzoli f@REDACTED
Mon Sep 17 13:33:20 CEST 2012


At Mon, 17 Sep 2012 13:20:12 +0200,
Loïc Hoguin wrote:
> -type my_fun_type() -> fun((Req) -> Req when Req::req()).
> 
> This is a bit annoying as this makes the typing of the funs a little 
> less precise than I hoped.
> 
> Did I miss something and can you still do something like this? Or if 
> not, can this be added eventually?

Well, can't you simply do

-type my_fun_type() -> fun((req()) -> req()) | other_type.

?

--
Francesco * Often in error, never in doubt



More information about the erlang-questions mailing list