package b0
Software construction and deployment kit
Install
dune-project
Dependency
Authors
Maintainers
Sources
b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.file/B0_ocaml/Modname/index.html
Module B0_ocaml.Modname
Source
Module names
Module names
The type for unqualified, capitalized, module names.
of_path_filename f
is the basename of f
, without extension, capitalized. This assumes the basename of f
follows the OCaml file naming convention mandated by the toolchain. If you know that may not be the case use mangle_filename
.
comare n0 n1
is a total order on module names compatiable with equal
.
pp
formats a module name.
Module name sets.
Module name maps.
Filename mangling
mangle_filename s
is module name obtained by mangling the filename s
as follows:
- Remove any trailing
.ml
or.mli
. - Map any dash
-
(0x2D) or dot.
(0x2E) to an underscore_
(0x5F). - Map any byte not allowed in OCaml compilation unit names to its two digits capital hexadecimal encoding.
- If the result does not start with an US-ASCII letter, prefix the unit name with
'M'
. - Capitalize the first letter.
The transformation is consistent with of_path_filename
on files that follows the OCaml toolchain convention. However the transformation is not injective. Here are a few examples:
filename Module name ---------------------------------------- publish-website Publish_website publish_website Publish_website import-data.ml Import_data import-data.xml.ml Import_data_xml import-data.script Import_data_script mix+match Mix2Bmatch _release.ml M_release
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page