diff options
author | Anthony Ramine <[email protected]> | 2014-06-27 14:43:03 +0200 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-08-20 12:30:12 +0200 |
commit | 764b0412344bf64f8b02ce198c41f14675b493a7 (patch) | |
tree | 9c98a62744732cf5e415454950fb7ee592ea0d22 /lib/stdlib/src/ms_transform.erl | |
parent | 631474e50fd84fd526dd1a5db4753b3d27ebb8e7 (diff) | |
download | otp-764b0412344bf64f8b02ce198c41f14675b493a7.tar.gz otp-764b0412344bf64f8b02ce198c41f14675b493a7.tar.bz2 otp-764b0412344bf64f8b02ce198c41f14675b493a7.zip |
Support maps in ms_transform
Diffstat (limited to 'lib/stdlib/src/ms_transform.erl')
-rw-r--r-- | lib/stdlib/src/ms_transform.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl index 27dfcf52e1..e671dcd8cf 100644 --- a/lib/stdlib/src/ms_transform.erl +++ b/lib/stdlib/src/ms_transform.erl @@ -1079,6 +1079,12 @@ normalise({cons,_,Head,Tail}) -> [normalise(Head)|normalise(Tail)]; normalise({tuple,_,Args}) -> list_to_tuple(normalise_list(Args)); +normalise({map,_,Pairs0}) -> + Pairs1 = lists:map(fun ({map_field_exact,_,K,V}) -> + {normalise(K),normalise(V)} + end, + Pairs0), + maps:from_list(Pairs1); %% Special case for unary +/-. normalise({op,_,'+',{char,_,I}}) -> I; normalise({op,_,'+',{integer,_,I}}) -> I; |