I have Core Erlang forms constructs with the cerl module. I wish to "decompile" it into an Erlang source code string.
I though I could do something like this:
Forms = erl_syntax:form_list(CoreForms),
erl_prettypr:format(Forms).
However erl_syntax:form_list/1 returns an empty list.
Core Erlang ASTs cannot be handled with the utilities in syntax_tools - those are for normal Erlang ASTs only. For Core Erlang there are two modules (undocumented) for prettyprinting:
core_ppin the compiler application, similar toerl_ppin stdlib, andcerl_prettyprin the hipe application (under lib/hipe/cerl/) which is similar toerl_prettyprin syntax_tools.