[erlang-questions] [Dialyser] Type parametrized behaviours

Francesco Mazzoli <>
Thu Apr 26 01:12:13 CEST 2012

Hi Kostis,

Thanks for your answer. I'll probably try to produce something more 
precise when I have time, but me and Matthew gave more precise use cases 
further in the thread, which hopefully clarify things (they did for 

> If I understand what you are sketching correctly, the problem I see is
> that since there will be no definition for state() in the behaviour
> module, that module will impose no constraints on what state() can be.

No, my problem is that I want to defer the decision of state() to the 
*implementing* behaviours, not the behaviour specs itself.

> Thus, your example is semantically equivalent to:
> -callback step(X) -> Y.

I don't follow you here, and I'm not sure what semantics you're 
referring to... My example was just an example of a function with an 
argument of a given type which returns something of the same type, 
nothing more. The rest of your post follows these premises, so I'm not 
sure what you're suggesting.


More information about the erlang-questions mailing list