[erlang-questions] erl_parse:abstract on a fun
Wed Jan 28 13:40:15 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hi, I recently ran into an issue where I am calling erl_parse:abstract
on a fun which fails with function_clause. What I need is to convert any
term to abstract form and in this case it was a stacktrace containing a fun.
Now I see two alternatives for solving this:
1) Try to convert the fun to abstract form for and wrap it somehow.
2) Replace the fun with erlang:fun_to_list/1 or similar, and live having
the "string representation".
Either way seems a bit difficult as it would involve traversing an
unknown term and replacing funs as needed.
Is this possible to do? Or is there a simpler way?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the erlang-questions