[erlang-questions] how: Getting -export_type information at run time?

Vlad Dumitrescu <>
Fri Apr 10 08:41:33 CEST 2015


Hi Bengt,

You have to extract this information from beam_lib:chunks(BEAM,
[abstract_code]) by means of erl_syntax_lib:fold/3 to keep only the
typespecs. It would be nice to have a higher-level library that gives
access to these internals.

regards,
Vlad


On Fri, Apr 10, 2015 at 8:23 AM, Bengt Kleberg <>
wrote:

> Greetings,
>
> How do I find type information at run time?
>
> A very nice Erlang module takes an options list. The options are -type
> defined and -export_type'ed.
> How do another module get that information during run time?
>
> I thought that it might be in very_nice:module_info(attributes), but no
> luck.
>
>
> bengt
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150410/d7a883be/attachment.html>


More information about the erlang-questions mailing list