[erlang-questions] Type specs unavailable in code compiled from core erlang?
Eric B Merritt
Tue Jan 3 23:36:59 CET 2012
When a module that includes type specs is compiled to core erlang,
those type specs and type definitions become specifically formatted
attributes in the module. When further compiled to beam the attributes
disappear and, I assume, are encoded in some other way. After much
research it seems that the specs and types are only defined in the
abstract_code chunk of the beam. In modules compiled from core erlang it
seems that the abstract_code chunk is always empty (this may make sense,
its something I am still rolling around in my head). I believe the
absence of abstract code renders the specs more or less useless?
This may argue for something Kenneth suggested back in may, that is
keeping spec and types in their own dedicated chunk that does not
disappear with the absence of debug information.
More information about the erlang-questions