Small poll

Bengt Kleberg Bengt.Kleberg@REDACTED
Thu Dec 18 10:15:51 CET 2003


Luke Gorrie wrote:
...deleted
> There's also a compiler option I've been wanting that could handle
> it. I would like an option to generate a M:module_info(calls) that
> returns a list of calls made by each function in the module.
> 
>   Returns: [{Function, Arity, [Callee]}]
>   Callee = {Module, Function, Arity}
> 
> This way it would be easy to write a program that loads all modules in
> the code path and reports all calls to functions that can't be found.

this would be a very good thing to have as a helper. today i manage by 
cheating. i am not using the code path, but the source code directly.


> (I must admit that I rarely have this particular problem, possibly
> because I use M-TAB and M-/ to complete my function names.)

in wily one can cut-and-paste with a mouse chord. it is rare to write 
any text more than once. different solution to the same problem.


> I really want it as a way to write a who_calls(M,F,A)->[{M,F,A}]
> function that could be used by Emacs for a "reverse tags lookup".
> who_calls would expect all relevant modules to be loaded and do a fold
> over them to find all callers. Then I can present the results in a
> "hyperlinked" buffer and save myself a lot of grep'ery.

would this find:
erlang:apply( module, function, [arg]),

my current grep on the source will find it.

and ofcourse, the real problem:
Module:Function(Arg)

any ideas on how to find these without running the code?


bengt



More information about the erlang-questions mailing list