[erlang-questions] erl_syntax:revert with binary arg

Max Kuznecov mek@REDACTED
Thu Sep 6 15:27:06 CEST 2012


I'm creating some dynamic module generation stuff and I found a
strange behavior,
erl_syntax:revert doesn't seem to work with binaries:

It works with strings (and other types)

> erl_syntax:revert(erl_syntax:string("DATA")).


> erl_syntax:revert(erl_syntax:binary(<<"DATA">>)).
** exception error: no function clause matching
(erl_syntax.erl, line 6508)
     in function  erl_syntax:'-revert/1-lc$^0/1-0-'/1 (erl_syntax.erl,
line 6508)
     in call from erl_syntax:revert/1 (erl_syntax.erl, line 6508)

Is there any special trick to handle binaries in revert()?



More information about the erlang-questions mailing list