Current section

Files

Jump to
gleam_stdlib gen src gleam@io.erl
Raw

gen/src/gleam@io.erl

-module(gleam@io).
-compile(no_auto_import).
-export([print/1, println/1, debug/1, get_line/1]).
-export_type([do_not_leak/0, get_line_error/0]).
-type do_not_leak() :: any().
-type get_line_error() :: eof | no_data.
-spec print(binary()) -> nil.
print(String) ->
io:fwrite(String, []),
nil.
-spec println(binary()) -> nil.
println(String) ->
io:fwrite(<<"~ts\n"/utf8>>, [String]),
nil.
-spec debug(UE) -> UE.
debug(Term) ->
io:fwrite(<<"~tp\n"/utf8>>, [Term]),
Term.
-spec get_line(binary()) -> {ok, binary()} | {error, get_line_error()}.
get_line(A) ->
gleam_stdlib:get_line(A).