aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io_lib.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-08-22 08:28:10 +0200
committerHans Bolinder <[email protected]>2013-08-22 08:28:10 +0200
commit4f61d1501e47d824a5c761300e8a21d9c5f1c5b7 (patch)
treea89de7089bca3e502a1aeb679fc7410c7daab7df /lib/stdlib/src/io_lib.erl
parentd084deb8176ebad6fb2c7758fab4083d49e2b6fe (diff)
parent85cbdc050b60b0d6cebcde4bb9fa9a2499f770a7 (diff)
downloadotp-4f61d1501e47d824a5c761300e8a21d9c5f1c5b7.tar.gz
otp-4f61d1501e47d824a5c761300e8a21d9c5f1c5b7.tar.bz2
otp-4f61d1501e47d824a5c761300e8a21d9c5f1c5b7.zip
Merge branch 'maint'
* maint: Correct the specifications of io_lib:fread/2,3
Diffstat (limited to 'lib/stdlib/src/io_lib.erl')
-rw-r--r--lib/stdlib/src/io_lib.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index 7c4c2742bc..53781e97f1 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()}}.