diff options
author | Hans Bolinder <[email protected]> | 2011-05-06 15:11:15 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-05-12 15:18:41 +0200 |
commit | 76ca320fd37cecdcf225ddcc094bc72a607b0453 (patch) | |
tree | 15c6c9cac782836be6deed2316b04f2cea74e7b3 /lib/stdlib/src/ms_transform.erl | |
parent | 68fe6a14539b82250373ef114d6576e74e1b8f2e (diff) | |
download | otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.tar.gz otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.tar.bz2 otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.zip |
Types and specifications have been modified and added
Diffstat (limited to 'lib/stdlib/src/ms_transform.erl')
-rw-r--r-- | lib/stdlib/src/ms_transform.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl index b565eb20f4..48e22e53fa 100644 --- a/lib/stdlib/src/ms_transform.erl +++ b/lib/stdlib/src/ms_transform.erl @@ -66,6 +66,11 @@ %% %% Called by compiler or ets/dbg:fun2ms when errors/warnings occur %% + +-spec(format_error(Error) -> Chars when + Error :: {error, module(), term()}, + Chars :: io_lib:chars()). + format_error({?WARN_SHADOW_VAR,Name}) -> lists:flatten( io_lib:format("variable ~p shadowed in ms_transform fun head", @@ -186,6 +191,12 @@ format_error(Else) -> %% %% Called when translating in shell %% + +-spec transform_from_shell(Dialect, Clauses, BoundEnvironment) -> term() when + Dialect :: ets | dbg, + Clauses :: [erl_parse:abstract_clause()], + BoundEnvironment :: erl_eval:binding_struct(). + transform_from_shell(Dialect, Clauses, BoundEnvironment) -> SaveFilename = setup_filename(), case catch ms_clause_list(1,Clauses,Dialect,gb_sets:new()) of @@ -211,6 +222,11 @@ transform_from_shell(Dialect, Clauses, BoundEnvironment) -> %% %% Called when translating during compiling %% + +-spec parse_transform(Forms, Options) -> Forms when + Forms :: [erl_parse:abstract_form()], + Options :: term(). + parse_transform(Forms, _Options) -> SaveFilename = setup_filename(), %io:format("Forms: ~p~n",[Forms]), |