diff options
Diffstat (limited to 'lib/stdlib/src/io_lib.erl')
-rw-r--r-- | lib/stdlib/src/io_lib.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl index 7c4c2742bc..375d05f359 100644 --- a/lib/stdlib/src/io_lib.erl +++ b/lib/stdlib/src/io_lib.erl @@ -82,7 +82,8 @@ -export([write_unicode_string/1, write_unicode_char/1, deep_unicode_char_list/1]). --export_type([chars/0, latin1_string/0, continuation/0, fread_error/0]). +-export_type([chars/0, latin1_string/0, continuation/0, + fread_error/0, fread_item/0]). %%---------------------------------------------------------------------- @@ -105,6 +106,8 @@ | 'string' | 'unsigned'. +-type fread_item() :: string() | atom() | integer() | float(). + %%---------------------------------------------------------------------- %% Interface calls to sub-modules. @@ -119,7 +122,7 @@ fwrite(Format, Args) -> -spec fread(Format, String) -> Result when Format :: string(), String :: string(), - Result :: {'ok', InputList :: [term()], LeftOverChars :: string()} + Result :: {'ok', InputList :: [fread_item()], LeftOverChars :: string()} | {'more', RestFormat :: string(), Nchars :: non_neg_integer(), InputStack :: chars()} @@ -134,7 +137,7 @@ fread(Chars, Format) -> Format :: string(), Return :: {'more', Continuation1 :: continuation()} | {'done', Result, LeftOverChars :: string()}, - Result :: {'ok', InputList :: [term()]} + Result :: {'ok', InputList :: [fread_item()]} | 'eof' | {'error', {'fread', What :: fread_error()}}. @@ -579,7 +582,7 @@ printable_unicode_list(_) -> false. %Everything else is false nl() -> "\n". - + %% %% Utilities for collecting characters in input files %% |