~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/stdlib/doc/src/erl_lint.xml

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<erlref>
5
5
  <header>
6
6
    <copyright>
7
 
      <year>1996</year><year>2010</year>
 
7
      <year>1996</year><year>2011</year>
8
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
9
9
    </copyright>
10
10
    <legalnotice>
60
60
      functions separately unless you have written your own Erlang
61
61
      compiler.</p>
62
62
  </description>
 
63
  <datatypes>
 
64
    <datatype>
 
65
      <name name="error_info"/>
 
66
    </datatype>
 
67
    <datatype>
 
68
      <name name="error_description"/>
 
69
    </datatype>
 
70
  </datatypes>
63
71
  <funcs>
64
72
    <func>
65
 
      <name>module(AbsForms) -> {ok,Warnings}  | {error,Errors,Warnings}</name>
66
 
      <name>module(AbsForms, FileName) -> {ok,Warnings}  | {error,Errors,Warnings}</name>
67
 
      <name>module(AbsForms, FileName, CompileOptions) ->  {ok,Warnings} | {error,Errors,Warnings}</name>
 
73
      <name name="module" arity="1"/>
 
74
      <name name="module" arity="2"/>
 
75
      <name name="module" arity="3"/>
68
76
      <fsummary>Check a module for errors</fsummary>
69
 
      <type>
70
 
        <v>AbsForms = [term()]</v>
71
 
        <v>FileName = FileName2 = atom() | string()</v>
72
 
        <v>Warnings = Errors = [{Filename2,[ErrorInfo]}]</v>
73
 
        <v>ErrorInfo = see separate description below.</v>
74
 
        <v>CompileOptions = [term()]</v>
75
 
      </type>
76
77
      <desc>
77
78
        <p>This function checks all the forms in a module for errors.
78
79
          It returns:
79
80
          </p>
80
81
        <taglist>
81
 
          <tag><c>{ok,Warnings}</c></tag>
 
82
          <tag><c>{ok,<anno>Warnings</anno>}</c></tag>
82
83
          <item>
83
84
            <p>There were no errors in the module.</p>
84
85
          </item>
85
 
          <tag><c>{error,Errors,Warnings}</c></tag>
 
86
          <tag><c>{error,<anno>Errors</anno>,<anno>Warnings</anno>}</c></tag>
86
87
          <item>
87
88
            <p>There were errors in the module.</p>
88
89
          </item>
93
94
          elements of <c>Options</c> that control the warnings are
94
95
          only described in <seealso marker="compiler:compile#erl_lint_options">compile(3)</seealso>.
95
96
          </p>
96
 
        <p>The <c>AbsForms</c> of a module which comes from a file
 
97
        <p>The <c><anno>AbsForms</anno></c> of a module which comes from a file
97
98
          that is read through <c>epp</c>, the Erlang pre-processor,
98
99
          can come from many files. This means that any references to
99
100
          errors must include the file name (see <seealso marker="epp">epp(3)</seealso>, or parser <seealso marker="erl_parse">erl_parse(3)</seealso>).
100
101
          The warnings and errors returned have the following format:
101
102
          </p>
102
103
        <code type="none">
103
 
    [{FileName2,[ErrorInfo]}]        </code>
 
104
    [{<anno>FileName2</anno>,[<anno>ErrorInfo</anno>]}]        </code>
104
105
        <p>The errors and warnings are listed in the order in which
105
106
          they are encountered in the forms. This means that the
106
107
          errors from one file may be split into different entries in
108
109
      </desc>
109
110
    </func>
110
111
    <func>
111
 
      <name>is_guard_test(Expr) -> bool()</name>
 
112
      <name name="is_guard_test" arity="1"/>
112
113
      <fsummary>Test for a guard test</fsummary>
113
 
      <type>
114
 
        <v>Expr = term()</v>
115
 
      </type>
116
114
      <desc>
117
 
        <p>This function tests if <c>Expr</c> is a legal guard test.
118
 
          <c>Expr</c> is an Erlang term representing the abstract form
 
115
        <p>This function tests if <c><anno>Expr</anno></c> is a legal guard test.
 
116
          <c><anno>Expr</anno></c> is an Erlang term representing the abstract form
119
117
          for the expression. <c>erl_parse:parse_exprs(Tokens)</c> can
120
 
          be used to generate a list of <c>Expr</c>.</p>
 
118
          be used to generate a list of <c><anno>Expr</anno></c>.</p>
121
119
      </desc>
122
120
    </func>
123
121
    <func>
124
 
      <name>format_error(ErrorDescriptor) -> Chars</name>
 
122
      <name name="format_error" arity="1"/>
125
123
      <fsummary>Format an error descriptor</fsummary>
126
 
      <type>
127
 
        <v>ErrorDescriptor = errordesc()</v>
128
 
        <v>Chars = [char() | Chars]</v>
129
 
      </type>
130
124
      <desc>
131
 
        <p>Takes an <c>ErrorDescriptor</c> and returns a string which
 
125
        <p>Takes an <c><anno>ErrorDescriptor</anno></c> and returns a string which
132
126
          describes the error or warning. This function is usually
133
127
          called implicitly when processing an <c>ErrorInfo</c>
134
128
          structure (see below).</p>