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