aboutsummaryrefslogtreecommitdiff
path: root/src/gleam__stdlib.erl
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-08-17 10:35:47 +0100
committerLouis Pilfold <louis@lpil.uk>2019-08-17 10:43:15 +0100
commitf90bd89adba09502b5a7ff188a910750257ef1b0 (patch)
tree10887e506df6ee671b41c2760c55cb14f72ddba4 /src/gleam__stdlib.erl
parent46ae58fb4bf6c3229ee96c842aff66087ba1aa26 (diff)
downloadgleam_stdlib-f90bd89adba09502b5a7ff188a910750257ef1b0.tar.gz
gleam_stdlib-f90bd89adba09502b5a7ff188a910750257ef1b0.zip
Update stdlib for new struct syntax
Diffstat (limited to 'src/gleam__stdlib.erl')
-rw-r--r--src/gleam__stdlib.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gleam__stdlib.erl b/src/gleam__stdlib.erl
index 5640e70..8434082 100644
--- a/src/gleam__stdlib.erl
+++ b/src/gleam__stdlib.erl
@@ -6,7 +6,7 @@
atom_create_from_string/1, atom_to_string/1, map_fetch/2,
iodata_append/2, iodata_prepend/2, identity/1, decode_int/1,
decode_string/1, decode_bool/1, decode_float/1, decode_thunk/1, decode_atom/1,
- decode_tuple/1, decode_list/1, decode_field/2, parse_int/1, parse_float/1]).
+ decode_struct2/1, decode_list/1, decode_field/2, parse_int/1, parse_float/1]).
expect_equal(Actual, Expected) -> ?assertEqual(Expected, Actual).
expect_not_equal(Actual, Expected) -> ?assertNotEqual(Expected, Actual).
@@ -58,8 +58,8 @@ decode_bool(Data) -> decode_error_msg("a Bool", Data).
decode_thunk(Data) when is_function(Data, 0) -> {ok, Data};
decode_thunk(Data) -> decode_error_msg("a zero arity function", Data).
-decode_tuple(Data = {_, _}) -> {ok, Data};
-decode_tuple(Data) -> decode_error_msg("a 2 element tuple", Data).
+decode_struct2(Data = {_, _}) -> {ok, Data};
+decode_struct2(Data) -> decode_error_msg("a 2 element struct", Data).
decode_list(Data) when is_list(Data) -> {ok, Data};
decode_list(Data) -> decode_error_msg("a List", Data).