Skip to content

Commit ebf5b1b

Browse files
committed
Fix Erlang
1 parent fe9aa89 commit ebf5b1b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/gleam/dynamic.gleam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ pub fn optional(
369369
if erlang {
370370
external fn decode_optional(
371371
Dynamic,
372-
Decoder(Option(a)),
373-
) -> Result(a, DecodeError) =
374-
"gleam_stdlib" "decode_optionl"
372+
Decoder(a),
373+
) -> Result(Option(a), DecodeError) =
374+
"gleam_stdlib" "decode_option"
375375
}
376376

377377
if javascript {

src/gleam_stdlib.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
-export([should_equal/2, should_not_equal/2, should_be_ok/1, should_be_error/1,
55
map_get/2, iodata_append/2, identity/1, decode_int/1, decode_bool/1,
6-
decode_float/1, decode_thunk/1, decode_list/1, decode_optional/2,
6+
decode_float/1, decode_thunk/1, decode_list/1, decode_option/2,
77
decode_field/2, parse_int/1, parse_float/1, less_than/2,
88
string_pop_grapheme/1, string_starts_with/2, wrap_list/1,
99
string_ends_with/2, string_pad/4, decode_map/1,
@@ -106,7 +106,7 @@ tuple_get(Data, Index) -> {ok, element(Index + 1, Data)}.
106106
decode_tuple(Data) when is_tuple(Data) -> {ok, Data};
107107
decode_tuple(Data) -> decode_error_msg(<<"Tuple">>, Data).
108108

109-
decode_optional(Term, F) ->
109+
decode_option(Term, F) ->
110110
Decode = fun(Inner) ->
111111
case F(Inner) of
112112
{ok, Decoded} -> {ok, {some, Decoded}};

0 commit comments

Comments
 (0)