diff options
author | Kostis Sagonas <[email protected]> | 2010-10-05 14:08:59 +0300 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-10-05 14:55:56 +0200 |
commit | 44d6f54d6782d63a25d80f6d920d67adb33bda52 (patch) | |
tree | a3ab2dd639ba2a56506901b6a0297c012b0e217f /lib/syntax_tools/src/erl_tidy.erl | |
parent | 3cfec17ff7aff97c5ec862a8b9e97d245849f9c3 (diff) | |
download | otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.tar.gz otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.tar.bz2 otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.zip |
syntax_tools: Add types to record definitions
Diffstat (limited to 'lib/syntax_tools/src/erl_tidy.erl')
-rw-r--r-- | lib/syntax_tools/src/erl_tidy.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/syntax_tools/src/erl_tidy.erl b/lib/syntax_tools/src/erl_tidy.erl index 021ab18736..1cfdc7234a 100644 --- a/lib/syntax_tools/src/erl_tidy.erl +++ b/lib/syntax_tools/src/erl_tidy.erl @@ -935,12 +935,13 @@ hidden_uses_2(Tree, Used) -> Used end. +-type fa() :: {atom(), arity()}. -type context() :: 'guard_expr' | 'guard_test' | 'normal'. -record(env, {file :: file:filename(), - module, - current, - imports, + module :: atom(), + current :: fa(), + imports = dict:new() :: dict(), context = normal :: context(), verbosity = 1 :: 0 | 1 | 2, quiet = false :: boolean(), @@ -951,7 +952,13 @@ hidden_uses_2(Tree, Used) -> new_guard_tests = true :: boolean(), old_guard_tests = false :: boolean()}). --record(st, {varc, used, imported, vars, functions, new_forms, rename}). +-record(st, {varc :: non_neg_integer(), + used = sets:new() :: set(), + imported :: set(), + vars :: set(), + functions :: set(), + new_forms = [] :: [erl_syntax:syntaxTree()], + rename :: dict()}). visit_used(Names, Defs, Roots, Imports, Module, Opts) -> File = proplists:get_value(file, Opts, ""), |