[erlang-questions] XREF - fun objects dependencies

Tyron Zerafa <>
Sun Apr 28 16:07:15 CEST 2013


Is it possible to get the function dependencies of a fun object using xref.

For instance given the following function:

-module(somemod).

f(File1) ->
    Ans = file:read(File1),
    F = fun() -> file:write(File1, "Done") end.

Is it possible to get
[
*{{somemod,'-f/1-fun-0-',1},{file,read,1}},*
{{somemod,f,1},{file,read,1}},
{{somemod,f,1},{file,write,2}}
]

instead of just
[
{{somemod,f,1},{file,read,1}},
{{somemod,f,1},{file,write,2}}
]

Thanks :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130428/4454d8ab/attachment.html>


More information about the erlang-questions mailing list