aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2021-07-31 18:24:21 +0100
committerLouis Pilfold <louis@lpil.uk>2021-07-31 18:24:21 +0100
commit8ef4b3b7cb02674b06a6f172ce83697a158e53ac (patch)
tree40e6ec367ec46620c2945ff25ed7e442436a5323
parentf072b5cf80855e4a790bab134e6f0d8d0da109e3 (diff)
downloadgleam_stdlib-8ef4b3b7cb02674b06a6f172ce83697a158e53ac.tar.gz
gleam_stdlib-8ef4b3b7cb02674b06a6f172ce83697a158e53ac.zip
Remove get line FFI
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/gleam_stdlib.erl9
2 files changed, 2 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d17c39..c32a2ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@
- The `dynamic.option` function has been renamed to `optional` and made more
permissive to other null values.
- The `dynamic.result` function has been made more permissive to other result values.
-- The `io.get_list` function has been moved to the `gleam_os` library.
+- The `io.get_list` function has been moved to the `gleam_erlang` library.
- The `atom` module has been moved to the `gleam_erlang` library.
- Prelude types like `Result`, `List` etc. are no longer redefined in their
stdlib modules.
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index ff8b97b..fc1d17e 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -11,7 +11,7 @@
bit_string_int_to_u32/1, bit_string_int_from_u32/1, decode_result/1,
bit_string_append/2, bit_string_part_/3, decode_bit_string/1,
compile_regex/2, regex_match/2, regex_split/2, regex_scan/2,
- base_decode64/1, wrap_list/1, get_line/1]).
+ base_decode64/1, wrap_list/1]).
should_equal(Actual, Expected) ->
?assertEqual(Expected, Actual),
@@ -233,10 +233,3 @@ base_decode64(S) ->
wrap_list(X) when is_list(X) -> X;
wrap_list(X) -> [X].
-
-get_line(Prompt) ->
- case io:get_line(Prompt) of
- eof -> {error, eof};
- {error, _} -> {error, no_data};
- Data -> {ok, Data}
- end.