[erlang-questions 7] Why bit syntax matching can't be used in match_spec?
max tan
maxtqm@REDACTED
Fri Mar 25 17:37:21 CET 2011
It seems bit syntax matching can't be used in match_spec, I just wonder why.
in erlang shell:
.............................
39> mnesia:dirty_select(main_dir, [{{k_v, <<"/root"/binary, "_"/binary>>,
'_'}, [], ['$_']}]).
** exception error: bad argument
..............................
47> ets:fun2ms(fun ({k_v, <<"/root", Res/binary>>, _}) -> Res end).
Error: fun head contains bit syntax matching of variable 'Res', which cannot
be translated into match_spec
{error,transform_error}
48>
.............................
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110326/0ba4a5d1/attachment.htm>
More information about the erlang-questions
mailing list