[erlang-questions] [Dialyser] Type parametrized behaviours

Francesco Mazzoli <>
Tue Apr 24 21:26:08 CEST 2012

On 24/04/12 19:10, Stavros Aronis wrote:
> Hi Francesco,
> Do you mean that after your update these types have to be moved within
> the behaviour file itself? If this is the case, you could export them
> using the "-export_type" attribute and then use them as remote types:
> "behaviour_module:type_name()". You can use them in this way in both
> specs and other -type definitions and at least Dialyzer won't have any
> problem at all.
> Stavros

No, that's not what I want.

To give a small example of what I want to do, a behaviour might define

    -callback step(state()) -> state().

where `state()' is not define locally in the behaviour, but in each 
implementing module.

I hope I made myself more clear.


More information about the erlang-questions mailing list