diff options
author | Hans Bolinder <[email protected]> | 2011-05-13 14:04:23 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-05-13 14:04:23 +0200 |
commit | 22f3c9720cb7d19a3aafac613f03aede91d6283f (patch) | |
tree | bc0961a8b4d9377d5e0e19204061f9d12e0ed4a9 /lib/stdlib/src/lib.erl | |
parent | 8c3a2a93b6b60253faa8397e5a02206b882b811f (diff) | |
parent | 76ca320fd37cecdcf225ddcc094bc72a607b0453 (diff) | |
download | otp-22f3c9720cb7d19a3aafac613f03aede91d6283f.tar.gz otp-22f3c9720cb7d19a3aafac613f03aede91d6283f.tar.bz2 otp-22f3c9720cb7d19a3aafac613f03aede91d6283f.zip |
Merge branch 'hb/stdlib/specs/OTP-9267' into dev
* hb/stdlib/specs/OTP-9267:
Types and specifications have been modified and added
Conflicts:
lib/stdlib/src/timer.erl
Diffstat (limited to 'lib/stdlib/src/lib.erl')
-rw-r--r-- | lib/stdlib/src/lib.erl | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/stdlib/src/lib.erl b/lib/stdlib/src/lib.erl index b2cfb00de9..c303ae60b5 100644 --- a/lib/stdlib/src/lib.erl +++ b/lib/stdlib/src/lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -38,7 +38,9 @@ flush_receive() -> %% %% Functions for doing standard system format i/o. %% --spec error_message(atom() | string() | binary(), [term()]) -> 'ok'. +-spec error_message(Format, Args) -> 'ok' when + Format :: io:format(), + Args :: [term()]. error_message(Format, Args) -> io:format(<<"** ~s **\n">>, [io_lib:format(Format, Args)]). @@ -55,17 +57,23 @@ progname() -> no_prog_name end. --spec nonl(string()) -> string(). +-spec nonl(String1) -> String2 when + String1 :: string(), + String2 :: string(). nonl([10]) -> []; nonl([]) -> []; nonl([H|T]) -> [H|nonl(T)]. --spec send(pid() | atom() | {atom(), node()}, term()) -> term(). +-spec send(To, Msg) -> Msg when + To :: pid() | atom() | {atom(), node()}, + Msg :: term(). send(To, Msg) -> To ! Msg. --spec sendw(pid() | atom() | {atom(), node()}, term()) -> term(). +-spec sendw(To, Msg) -> Msg when + To :: pid() | atom() | {atom(), node()}, + Msg :: term(). sendw(To, Msg) -> To ! {self(), Msg}, @@ -89,7 +97,7 @@ eval_str(Str) when is_list(Str) -> true -> case erl_parse:parse_exprs(Toks) of {ok, Exprs} -> - case catch erl_eval:exprs(Exprs, []) of + case catch erl_eval:exprs(Exprs, erl_eval:new_bindings()) of {value, Val, _} -> {ok, Val}; Other -> |