Reputation: 2829
I was reading through the Scanf.Scanning module and came across this for the open_in documentation:
open_in -> Scanning.open_in fname returns a !Scanning.in_channel...
What's the ! signify in !Scanning.in_channel?
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Scanf.Scanning.html
Upvotes: 0
Views: 125
Reputation: 18912
In this case, the !
is an ocamldoc artefact that was generated due to a missing reference. It has no meaning and should be ignored.
More precisely, when writing documentation comment for ocamldoc, it is possible to link to a reference using {!object_name}
. Unfortunately, the scanf module was using [!object_name]
by mistake in place of {!object_name}
. In ocamldoc syntax [code]
is used for code fragment, thus using [!object_name]
was adding an unintended !
to the generated html.
For now, you can safely ignore all !
appearing in the Scanf
page and these errors has been fixed in the upcoming 4.05 version of the manual (at least most of them, the rest will be fixed for 4.06).
Upvotes: 4