aboutsummaryrefslogtreecommitdiffstats
path: root/lib/typer/src/typer.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2011-02-06 23:46:15 +0200
committerKostis Sagonas <[email protected]>2011-02-06 23:46:15 +0200
commit28af8292387864f1d8467ddd6d8d6bb343e6851b (patch)
treeea2566c04d30d93a88c5f12577716bcbd64fcf14 /lib/typer/src/typer.erl
parentfde7e1e302d78cdf7d6554804ca785bf637fcd0a (diff)
downloadotp-28af8292387864f1d8467ddd6d8d6bb343e6851b.tar.gz
otp-28af8292387864f1d8467ddd6d8d6bb343e6851b.tar.bz2
otp-28af8292387864f1d8467ddd6d8d6bb343e6851b.zip
Fix a type error and do some further cleanup
Diffstat (limited to 'lib/typer/src/typer.erl')
-rw-r--r--lib/typer/src/typer.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl
index f6b6de6261..0e91e795af 100644
--- a/lib/typer/src/typer.erl
+++ b/lib/typer/src/typer.erl
@@ -433,7 +433,7 @@ get_functions(File, Analysis) ->
normalize_incFuncs(Functions) ->
[FunInfo || {_FileName, FunInfo} <- Functions].
--spec remove_module_info([fun_info()]) -> [fun_info()].
+-spec remove_module_info([func_info()]) -> [func_info()].
remove_module_info(FunInfoList) ->
F = fun ({_,module_info,0}) -> false;
@@ -873,15 +873,14 @@ analyze_core_tree(Core, Records, SpecInfo, ExpTypes, Analysis, File) ->
CG = dialyzer_callgraph:scan_core_tree(Tree, TmpCG),
Fun = fun analyze_one_function/2,
All_Defs = cerl:module_defs(Tree),
- Acc = lists:foldl(Fun, #tmpAcc{file=File, module=Module}, All_Defs),
+ Acc = lists:foldl(Fun, #tmpAcc{file = File, module = Module}, All_Defs),
Exported_FuncMap = map__insert({File, Ex_Funcs}, Analysis#analysis.ex_func),
- %% NOTE: we must sort all functions in the file which
+ %% we must sort all functions in the file which
%% originate from this file by *numerical order* of lineNo
Sorted_Functions = lists:keysort(1, Acc#tmpAcc.funcAcc),
FuncMap = map__insert({File, Sorted_Functions}, Analysis#analysis.func),
- %% NOTE: However we do not need to sort functions
- %% which are imported from included files.
- IncFuncMap = map__insert({File, Acc#tmpAcc.incFuncAcc},
+ %% we do not need to sort functions which are imported from included files
+ IncFuncMap = map__insert({File, Acc#tmpAcc.incFuncAcc},
Analysis#analysis.inc_func),
FMs = Analysis#analysis.fms ++ [{File, Module}],
RecordMap = map__insert({File, Records}, Analysis#analysis.record),
@@ -983,13 +982,15 @@ msg(Msg) ->
%%--------------------------------------------------------------------
-spec version_message() -> no_return().
+
version_message() ->
io:format("TypEr version "++?VSN++"\n"),
erlang:halt(0).
-spec help_message() -> no_return().
+
help_message() ->
- S = " Usage: typer [--help] [--version] [--plt PLT] [--edoc]
+ S = <<" Usage: typer [--help] [--version] [--plt PLT] [--edoc]
[--show | --show-exported | --annotate | --annotate-inc-files]
[-Ddefine]* [-I include_dir]* [-T application]* [-r] file*
@@ -1028,7 +1029,7 @@ help_message() ->
Note:
* denotes that multiple occurrences of these options are possible.
-",
+">>,
io:put_chars(S),
erlang:halt(0).