aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index c6b5130..7414439 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -373,6 +373,12 @@ inspect(false) ->
"False";
inspect(nil) ->
"Nil";
+inspect(Data) when is_map(Data) ->
+ Fields = [
+ [<<"#(">>, inspect(Key), <<", ">>, inspect(Value), <<")">>]
+ || {Key, Value} <- maps:to_list(Data)
+ ],
+ ["map.from_list([", lists:join(", ", Fields), "])"];
inspect(Atom) when is_atom(Atom) ->
Binary = erlang:atom_to_binary(Atom),
case inspect_maybe_gleam_atom(Binary, none, <<>>) of