[erlang-questions] how: Getting -export_type information at run time?
Fri Apr 10 10:25:17 CEST 2015
When I use beam_lib:chunks/2 I get tuples that are easy to identity as
When I turn the chunks into an abstract tree I do not understand how to
find the type info any more. How should a fun for erl_syntax_lib:fold/3
look, to identify the type information nodes?
On 04/10/2015 08:41 AM, Vlad Dumitrescu wrote:
> 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.
> On Fri, Apr 10, 2015 at 8:23 AM, Bengt Kleberg
> <bengt.kleberg@REDACTED <mailto:bengt.kleberg@REDACTED>> wrote:
> 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.
> erlang-questions mailing list
> erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions