[erlang-bugs] Specs missing or wrong in ssl, inet and gen_tcp

Loïc Hoguin <>
Tue May 3 15:40:50 CEST 2011


Just forwarding a few issues I've encountered with type specs in ssl,
inet and gen_tcp. Hope you don't mind me sending all of them in a single

I will try to send patches when I get some free time and would probably
benefit from any comment you might make here.

* https://github.com/erlang/otp/blob/dev/lib/ssl/src/ssl.erl

  * socketoption() is incomplete: it can also accept atoms like binary,
    list, inet6 or inet and also other kinds of tuples

  * socketoption() should probably depend on types defined
    in gen_tcp and inet

  * option() is defined as socketoption()|ssloption()|transportoption(),
    problem is socketoption() is defined as a list of options while
    others are tuples; socketoption() should be tuples too

* https://github.com/erlang/otp/blob/dev/lib/kernel/src/gen_tcp.erl

  * no specs at all, any plans on writing them? if not, any advice?

* https://github.com/erlang/otp/blob/dev/lib/kernel/src/inet.erl#L109

  * I'm assuming 'mode' is 'list' | 'binary' and not list() | binary()


Loïc Hoguin

More information about the erlang-bugs mailing list