~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/dialyzer.hrl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%% This is an -*- Erlang -*- file.
2
2
%%%
3
3
%%% %CopyrightBegin%
4
 
%%% 
5
 
%%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
6
 
%%% 
 
4
%%%
 
5
%%% Copyright Ericsson AB 2006-2011. All Rights Reserved.
 
6
%%%
7
7
%%% The contents of this file are subject to the Erlang Public License,
8
8
%%% Version 1.1, (the "License"); you may not use this file except in
9
9
%%% compliance with the License. You should have received a copy of the
10
10
%%% Erlang Public License along with this software. If not, it can be
11
11
%%% retrieved online at http://www.erlang.org/.
12
 
%%% 
 
12
%%%
13
13
%%% Software distributed under the License is distributed on an "AS IS"
14
14
%%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
15
%%% the License for the specific language governing rights and limitations
16
16
%%% under the License.
17
 
%%% 
 
17
%%%
18
18
%%% %CopyrightEnd%
19
19
%%%
20
20
%%%-------------------------------------------------------------------
31
31
-define(RET_DISCREPANCIES, 2).
32
32
 
33
33
-type dial_ret() :: ?RET_NOTHING_SUSPICIOUS
34
 
                  | ?RET_INTERNAL_ERROR 
 
34
                  | ?RET_INTERNAL_ERROR
35
35
                  | ?RET_DISCREPANCIES.
36
36
 
37
37
%%--------------------------------------------------------------------
52
52
-define(WARN_CONTRACT_NOT_EQUAL, warn_contract_not_equal).
53
53
-define(WARN_CONTRACT_SUBTYPE, warn_contract_subtype).
54
54
-define(WARN_CONTRACT_SUPERTYPE, warn_contract_supertype).
 
55
-define(WARN_CONTRACT_RANGE, warn_contract_range).
55
56
-define(WARN_CALLGRAPH, warn_callgraph).
56
57
-define(WARN_UNMATCHED_RETURN, warn_umatched_return).
57
58
-define(WARN_RACE_CONDITION, warn_race_condition).
 
59
-define(WARN_BEHAVIOUR, warn_behaviour).
58
60
 
59
61
%%
60
62
%% The following type has double role:
68
70
                       | ?WARN_CONTRACT_TYPES | ?WARN_CONTRACT_SYNTAX
69
71
                       | ?WARN_CONTRACT_NOT_EQUAL | ?WARN_CONTRACT_SUBTYPE
70
72
                       | ?WARN_CONTRACT_SUPERTYPE | ?WARN_CALLGRAPH
71
 
                       | ?WARN_UNMATCHED_RETURN | ?WARN_RACE_CONDITION.
 
73
                       | ?WARN_UNMATCHED_RETURN | ?WARN_RACE_CONDITION
 
74
                       | ?WARN_BEHAVIOUR | ?WARN_CONTRACT_RANGE.
72
75
 
73
76
%%
74
77
%% This is the representation of each warning as they will be returned
85
88
%%--------------------------------------------------------------------
86
89
%% THIS TYPE SHOULD ONE DAY DISAPPEAR -- IT DOES NOT BELONG HERE
87
90
%%--------------------------------------------------------------------
88
 
 
 
91
 
89
92
-type ordset(T)      :: [T] .      %% XXX: temporarily
90
93
 
91
94
%%--------------------------------------------------------------------
100
103
-type dial_define()   :: {atom(), term()}.
101
104
-type dial_option()   :: {atom(), term()}.
102
105
-type dial_options()  :: [dial_option()].
 
106
-type fopt()          :: 'basename' | 'fullpath'.
 
107
-type format()        :: 'formatted' | 'raw'.
103
108
-type label()         :: non_neg_integer().
104
109
-type rep_mode()      :: 'quiet' | 'normal' | 'verbose'.
105
110
-type start_from()    :: 'byte_code' | 'src_code'.
118
123
                   plt                             :: dialyzer_plt:plt(),
119
124
                   use_contracts  = true           :: boolean(),
120
125
                   race_detection = false          :: boolean(),
 
126
                   behaviours_chk = false          :: boolean(),
121
127
                   callgraph_file = ""             :: file:filename()}).
122
128
 
123
129
-record(options, {files           = []             :: [file:filename()],
126
132
                  defines         = []             :: [dial_define()],
127
133
                  from            = byte_code      :: start_from(),
128
134
                  get_warnings    = maybe          :: boolean() | 'maybe',
129
 
                  init_plt        = none           :: 'none' | file:filename(),
 
135
                  init_plts       = []             :: [file:filename()],
130
136
                  include_dirs    = []             :: [file:filename()],
131
137
                  output_plt      = none           :: 'none' | file:filename(),
132
138
                  legal_warnings  = ordsets:new()  :: ordset(dial_warn_tag()),
134
140
                  erlang_mode     = false          :: boolean(),
135
141
                  use_contracts   = true           :: boolean(),
136
142
                  output_file     = none           :: 'none' | file:filename(),
137
 
                  output_format   = formatted      :: 'raw' | 'formatted',
 
143
                  output_format   = formatted      :: format(),
 
144
                  filename_opt    = basename       :: fopt(),
138
145
                  callgraph_file  = ""             :: file:filename(),
139
 
                  check_plt       = true           :: boolean()
140
 
                 }).
 
146
                  check_plt       = true           :: boolean()}).
141
147
 
142
148
-record(contract, {contracts      = []             :: [contract_pair()],
143
149
                   args           = []             :: [erl_types:erl_type()],