[erlang-questions] orddict and dict and types

Russell Brown russelldb@REDACTED
Wed Dec 3 15:25:55 CET 2014


On 3 Dec 2014, at 14:23, Magnus Henoch <magnus@REDACTED> wrote:

> Russell Brown <russelldb@REDACTED> writes:
> 
>> Hi, I swapped orddict for dict in a module. When I used orddict I took
>> advantage of the fact orddict was just a list to have some nice
>> detailed types. I see that dict has the type dict(key, value) in the
>> documentation, but it’s not exported. Now I seem to have lost all that
>> richness I was able to express with orddict (or [{Key, Val}] anyway.)
>> 
>> Is there anyway to keep the detailed type specs and use dict() you can
>> think of? Why does dict.erl not export dict(K, V) ?
> 
> In 17.0, the type dict:dict/2 is exported.  Perhaps you're using an
> earlier version?

Yes! My mistake, I’m using r16, thanks.

> 
> Regards,
> Magnus




More information about the erlang-questions mailing list