[erlang-questions] getting type info at runtime
Mon Sep 26 18:13:24 CEST 2011
You can get the raw data from beam_lib:chunks(Beam,[abstract_code]) and then go from there. There is afaik no other interface to get the type information in runtime, maybe some function within dialyzer? The beam file has to be compiled with debug_info though for the spec information to be made part of the beam file.
----- Original Message -----
From: "Tim Watson" <watson.timothy@REDACTED>
Sent: Monday, September 26, 2011 5:43:06 PM
Subject: Re: [erlang-questions] getting type info at runtime
I'd like to be able to get type info declared using -spec annotations at runtime. Is this something that others would consider useful? Is it in the pipeline already, or is a patch required? Also, is there a recommended way to get the -spec data back using code available in existing R14 releases? My goal is to be able to locate things (e.g., modules and functions) by name and/or type signature.
erlang-questions mailing list
More information about the erlang-questions