1Builtin_attributes(3)            OCaml library           Builtin_attributes(3)
2
3
4

NAME

6       Builtin_attributes - Support for some of the builtin attributes
7

Module

9       Module   Builtin_attributes
10

Documentation

12       Module Builtin_attributes
13        : sig end
14
15
16       Support for some of the builtin attributes
17
18
19       -ocaml.deprecated
20
21       -ocaml.alert
22
23       -ocaml.error
24
25       -ocaml.ppwarning
26
27       -ocaml.warning
28
29       -ocaml.warnerror
30
31       -ocaml.explicit_arity (for camlp4/camlp5)
32
33       -ocaml.warn_on_literal_pattern
34
35       -ocaml.deprecated_mutable
36
37       -ocaml.immediate
38
39       -ocaml.boxed / ocaml.unboxed
40
41       Warning: this module is unstable and part of Compiler_libs .
42
43
44
45
46
47
48       val check_alerts : Location.t -> Parsetree.attributes -> string -> unit
49
50
51
52
53       val  check_alerts_inclusion : def:Location.t -> use:Location.t -> Loca‐
54       tion.t -> Parsetree.attributes ->  Parsetree.attributes  ->  string  ->
55       unit
56
57
58
59
60       val     alerts_of_attrs     :     Parsetree.attributes     ->    string
61       Misc.Stdlib.String.Map.t
62
63
64
65
66       val     alerts_of_sig     :     Parsetree.signature      ->      string
67       Misc.Stdlib.String.Map.t
68
69
70
71
72       val      alerts_of_str      :     Parsetree.structure     ->     string
73       Misc.Stdlib.String.Map.t
74
75
76
77
78       val check_deprecated_mutable : Location.t  ->  Parsetree.attributes  ->
79       string -> unit
80
81
82
83
84       val  check_deprecated_mutable_inclusion  :  def:Location.t -> use:Loca‐
85       tion.t -> Location.t -> Parsetree.attributes -> Parsetree.attributes ->
86       string -> unit
87
88
89
90
91       val check_no_alert : Parsetree.attributes -> unit
92
93
94
95
96       val error_of_extension : Parsetree.extension -> Location.error
97
98
99
100
101       val warning_attribute : ?ppwarning:bool -> Parsetree.attribute -> unit
102
103       Apply  warning  settings  from  the  specified attribute.  "ocaml.warn‐
104       ing"/"ocaml.warnerror" (and variants without the prefix) are  processed
105       and other attributes are ignored.
106
107       Also implement ocaml.ppwarning (unless ~ppwarning:false is passed).
108
109
110
111       val warning_scope : ?ppwarning:bool -> Parsetree.attributes -> (unit ->
112       'a) -> 'a
113
114       Execute a function in a new scope for  warning  settings.   This  means
115       that  the  effect of any call to warning_attribute during the execution
116       of this function will be discarded after execution.
117
118       The function also takes a list of attributes which are  processed  with
119       warning_attribute in the fresh scope before the function is executed.
120
121
122
123       val warn_on_literal_pattern : Parsetree.attributes -> bool
124
125
126
127
128       val explicit_arity : Parsetree.attributes -> bool
129
130
131
132
133       val immediate : Parsetree.attributes -> bool
134
135
136
137
138       val has_unboxed : Parsetree.attributes -> bool
139
140
141
142
143       val has_boxed : Parsetree.attributes -> bool
144
145
146
147
148
149
150OCamldoc                          2019-07-30             Builtin_attributes(3)
Impressum