Skip to content

Instantly share code, notes, and snippets.

@archaelus
Created February 19, 2010 02:54
Show Gist options
  • Save archaelus/308360 to your computer and use it in GitHub Desktop.
Save archaelus/308360 to your computer and use it in GitHub Desktop.
PrintSrc = fun (Module) ->
{ok,{_,[{abstract_code,{_,AC}}]}} =
beam_lib:chunks(code:which(Module),[abstract_code]),
io:put_chars(erl_prettypr:format(erl_syntax:form_list(AC)))
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment