[erlang-questions] Accessing function specifications

Kostis Sagonas kostis@REDACTED
Wed Sep 1 20:09:36 CEST 2010

Svatopluk Šperka wrote:
>  Hi,
> would anybody know if it is possible to access type specification of a 
> function in the same module at runtime ?

Yes, it is possible. (*)

> And secondly is it possible to 
> declare different specification for each function clause (yeah, pretty 
> dirty but the end justifies the means ;) ?

Yes, this is also possible ;-)  (**)


  (*) Though the only tool I know of is not released, so effectively the 
answer to your question is: "You have to do it yourself somehow".

(**) Look for overloaded specs here: 

More information about the erlang-questions mailing list