[erlang-questions] Module language for Dialyzer?

Siraaj Khandkar <>
Fri Oct 4 04:48:29 CEST 2013


What are the theoretical problems (if any) with an idea of extending 
Dialyzer with a module language to express composable interfaces in the 
spirit of SML?

Something along the line of:

dict.esig:
     -signature(dict) ::
     sig
         -type t(K, V) :: opaque().
         -fun new() -> t(K, V).
         -fun add(t(K, V), K, V) -> t(K, V).
         -fun find(t(K, V), K) -> none | {some, V}.
         ...
     end.

stringable.esig:
     -signature(stringable) ::
     sig
         -type t() :: opaque().
         -fun to_string(t()) -> string().
         -fun of_string(string()) -> t().
         ...
     end.

my_serializable_dict.erl:
     -module(my_serializable_dict).
     -implements([dict, stringable]).
     ...


Syntax is not the point of this, so don't get hung-up on it for the 
purpose of this question - I'm making it up as I type :)


More information about the erlang-questions mailing list