diff options
author | Hans Bolinder <[email protected]> | 2014-03-20 16:01:54 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-03-20 16:01:54 +0100 |
commit | eb44d0b913a97bf460ba890b04900096f79dcd53 (patch) | |
tree | 16eac06dc26ff313b4a7c7bf6e37bec1eacccaef /lib/stdlib/src/escript.erl | |
parent | 73af231f1a22083031df49ba19fdfd4f6b434a10 (diff) | |
parent | e2733e0dfe107e2f48c083841ffd128bcbf0abef (diff) | |
download | otp-eb44d0b913a97bf460ba890b04900096f79dcd53.tar.gz otp-eb44d0b913a97bf460ba890b04900096f79dcd53.tar.bz2 otp-eb44d0b913a97bf460ba890b04900096f79dcd53.zip |
Merge branch 'hb/spec_related_fixes'
* hb/spec_related_fixes:
test_server: Fix a Dialyzer warning
Correct the contract of io:getopts()
Fix some Dialyzer warnings
Diffstat (limited to 'lib/stdlib/src/escript.erl')
-rw-r--r-- | lib/stdlib/src/escript.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl index 35f6dff57e..a8a82272d6 100644 --- a/lib/stdlib/src/escript.erl +++ b/lib/stdlib/src/escript.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2013. All Rights Reserved. +%% Copyright Ericsson AB 2007-2014. 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 @@ -289,6 +289,8 @@ start(EscriptOptions) -> my_halt(127) end. +-spec parse_and_run(_, _, _) -> no_return(). + parse_and_run(File, Args, Options) -> CheckOnly = lists:member("s", Options), {Source, Module, FormsOrBin, HasRecs, Mode} = @@ -727,6 +729,8 @@ epp_parse_file2(Epp, S, Forms, Parsed) -> %% Evaluate script %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-spec debug(_, _, _) -> no_return(). + debug(Module, AbsMod, Args) -> case hidden_apply(debugger, debugger, start, []) of {ok, _} -> @@ -742,6 +746,8 @@ debug(Module, AbsMod, Args) -> fatal("Cannot start the debugger") end. +-spec run(_, _) -> no_return(). + run(Module, Args) -> try Module:main(Args), @@ -751,6 +757,8 @@ run(Module, Args) -> fatal(format_exception(Class, Reason)) end. +-spec interpret(_, _, _, _) -> no_return(). + interpret(Forms, HasRecs, File, Args) -> %% Basic validation before execution case erl_lint:module(Forms) of |