aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2021-09-10 18:21:37 +0100
committerLouis Pilfold <louis@lpil.uk>2021-09-10 18:21:37 +0100
commita5f125dafacac027d088c7fae9aa095d0a0bfaec (patch)
tree0eef3295715f1e9747485c7846b5436be755dce2 /src/gleam_stdlib.erl
parente77e60a4f44a04a5195d471ce5fcd82033deb5cd (diff)
downloadgleam_stdlib-a5f125dafacac027d088c7fae9aa095d0a0bfaec.tar.gz
gleam_stdlib-a5f125dafacac027d088c7fae9aa095d0a0bfaec.zip
In Gleam tuple decoding
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index 2d7345d..72082d1 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -6,8 +6,7 @@
decode_float/1, decode_thunk/1, decode_list/1, decode_optional/2,
decode_field/2, parse_int/1, parse_float/1, less_than/2,
string_pop_grapheme/1, string_starts_with/2, wrap_list/1,
- string_ends_with/2, string_pad/4, decode_tuple2/1, decode_tuple3/1,
- decode_tuple4/1, decode_tuple5/1, decode_tuple6/1, decode_map/1,
+ string_ends_with/2, string_pad/4, decode_map/1,
bit_string_int_to_u32/1, bit_string_int_from_u32/1, decode_result/1,
bit_string_slice/3, decode_bit_string/1, compile_regex/2, regex_scan/2,
percent_encode/1, percent_decode/1, regex_check/2, regex_split/2,
@@ -71,21 +70,6 @@ classify_dynamic(X) when
is_function(X, 12) -> <<"Function">>;
classify_dynamic(_) -> <<"Some other type">>.
-decode_tuple2({_, _} = T) -> {ok, T};
-decode_tuple2(Data) -> decode_error_msg(<<"Tuple of 2 elements">>, Data).
-
-decode_tuple3({_, _, _} = T) -> {ok, T};
-decode_tuple3(Data) -> decode_error_msg(<<"Tuple of 3 elements">>, Data).
-
-decode_tuple4({_, _, _, _} = T) -> {ok, T};
-decode_tuple4(Data) -> decode_error_msg(<<"Tuple of 4 elements">>, Data).
-
-decode_tuple5({_, _, _, _, _} = T) -> {ok, T};
-decode_tuple5(Data) -> decode_error_msg(<<"Tuple of 5 elements">>, Data).
-
-decode_tuple6({_, _, _, _, _, _} = T) -> {ok, T};
-decode_tuple6(Data) -> decode_error_msg(<<"Tuple of 6 elements">>, Data).
-
decode_map(Data) when is_map(Data) -> {ok, Data};
decode_map(Data) -> decode_error_msg(<<"Map">>, Data).