diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-01-14 11:58:40 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-01-14 14:48:59 +0100 |
commit | e593432c9e590c29971a4e0dc1c6692d82c2a1d6 (patch) | |
tree | f4516f25c12a80345468039d4fb56e5b0ddfa142 /lib/hipe/cerl | |
parent | fea8e2cade3de24f044c834e0b62f58921a4e9c1 (diff) | |
download | otp-e593432c9e590c29971a4e0dc1c6692d82c2a1d6.tar.gz otp-e593432c9e590c29971a4e0dc1c6692d82c2a1d6.tar.bz2 otp-e593432c9e590c29971a4e0dc1c6692d82c2a1d6.zip |
hipe: Fix map pretty printing of pairs
In commit f667931e2905797ffab63e224e56eaf07f77178a the core format changed
for map pairs. Let dialyzer and hipe pretty printing of maps also adhere to
those changes.
An Erlang map update, M#{foo := 1, bar => 2} will now be printed as:
~{ 'foo' := 1, 'bar' => 2 | M }~
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r-- | lib/hipe/cerl/cerl_prettypr.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/hipe/cerl/cerl_prettypr.erl b/lib/hipe/cerl/cerl_prettypr.erl index 7e8b7f60bd..729143eba9 100644 --- a/lib/hipe/cerl/cerl_prettypr.erl +++ b/lib/hipe/cerl/cerl_prettypr.erl @@ -627,12 +627,10 @@ lay_map_pair(Node, Ctxt) -> K = map_pair_key(Node), V = map_pair_val(Node), OpTxt = case concrete(map_pair_op(Node)) of - assoc -> "::<"; - exact -> "~<" + assoc -> "=>"; + exact -> ":=" end, - beside(floating(text(OpTxt)), - beside(lay(K,Ctxt),beside(floating(text(",")), beside(lay(V,Ctxt), - floating(text(">")))))). + beside(lay(K,Ctxt),beside(floating(text(OpTxt)),lay(V,Ctxt))). lay_let(Node, Ctxt) -> V = lay_value_list(let_vars(Node), Ctxt), |