You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Infix operators**: Where can I find documentation on standard infix
124
124
operators such as `@@`?
125
-
125
+
126
126
For general documentation on operators, see the OCaml manual: [Operators](https://caml.inria.fr/pub/docs/manual-ocaml/expr.html#sec151)
127
-
in the Expressions section, [Index of values](http://caml.inria.fr/pub/docs/manual-ocaml/libref/index_values.html), or the
128
-
[Stdlib module documentation](http://caml.inria.fr/pub/docs/manual-ocaml/libref/Stdlib.html). For the Stdlib document,
127
+
in the Expressions section, [Index of values](http://v2.ocaml.org/api/index_values.html), or the
128
+
[Stdlib module documentation](http://v2.ocaml.org/api/Stdlib.html). For the Stdlib document,
129
129
you'll want to search the page for "operator" or for the specific operator you're interested in.
130
-
130
+
131
131
For operator precedence and associativity, see the [Expressions](https://caml.inria.fr/pub/docs/manual-ocaml/expr.html)
132
-
section of the manual, and scroll down past the BNF syntax specification or search for "Construction or operator". The
132
+
section of the manual, and scroll down past the BNF syntax specification or search for "Construction or operator". The
133
133
Stdlib module also specifies precedence and associativity in the documentation for each operator.
134
-
134
+
135
135
(Also possibly useful: [Built-in operators and functions](https://www2.lib.uchicago.edu/keith/ocaml-class/operators.html)
136
136
at *OCaml for the Skeptical*.)
137
137
138
138
***ppx**: What are these `[%% ...]`, `[@@ ...]` expressions that I
139
-
see in people's code? What does it mean when there's a percent sign in the
139
+
see in people's code? What does it mean when there's a percent sign in the
140
140
middle of a name, as in `let%lwt`? What are extension points?
141
-
141
+
142
142
See [A Guide to PreProcessor eXtensions](ppx.md) or [A Tutorial to OCaml -ppx Language Extensions](https://www.victor.darvariu.me/jekyll/update/2018/06/19/ppx-tutorial.html).
143
143
144
144
***+'a, -'a**: Why are some type variables prefaced by "+" or "-",
145
145
as in `type +'a t`?
146
-
146
+
147
147
These are called "variance annotations". They're used to constrain
148
148
subtyping relations. See [+'a and
149
149
-'a](https://blog.janestreet.com/a-and-a) at the Jane Street Tech
150
150
Blog.
151
151
152
152
***open!**: What's the difference between `open My_module` and
153
153
`open! My_module`?
154
-
154
+
155
155
Both make the values and types in `My_module` available without having
156
156
to write "My_module." in front of them. `open My_module` will trigger
157
157
a warning if `My_module` overrides existing definitions. `open!` suppresses
158
158
this warning. See [Overriding in open statements](http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec250)
159
159
from [Chapter 8 Language extensions](http://caml.inria.fr/pub/docs/manual-ocaml/extn.html) in
160
-
the OCaml manual.
161
-
160
+
the OCaml manual.
161
+
162
162
At present `open!` also suppresses another warning as well. This is a warning
163
163
that no definition in the opened module is in fact used within
164
164
`open!`'s scope. There is some disagreement about whether this behavior
@@ -167,4 +167,3 @@ how to cope with them.
167
167
a module as a way of providing an alternative standard programming environment.
168
168
See the discussion at this OCaml PR: [Fix PR6638: "unused open" warning was incorrectly suppressed
169
169
by "open!"](https://github.com/ocaml/ocaml/pull/1110).
0 commit comments