
Ocaml tools
Today I will try to tell you about tools that help to program in Objective CAML.
Tools the CAML of Objective:
* ocamlc,
* ocaml interpreter
* ocamlbrowser
ocamlc, - of Objective Caml language compiler, is essentially a command interface,
receives and processes posledovatelno.Argumenty arguments ending in .mli
are the source files for compilation unit interfaces. Here are the names
exported by compilation units: variable names, data types, etc.
From the A.mli file, the ocamlc compiler will create an A.cmi file with a compiled interface.
Arguments ending in .ml are considered source files for implementations of compilation units.
Implementations contain definitions for names exported by a unit, as well as expressions calculated for their third-party effects. From the A.ml file using ocamlc, an object with bytecode in the A.cmo file will be created later.
Key ocamlc options:
-a
Creates a library (.cma file) from the .cmo object files specified on the command line. The name of the library can be specified using the -o option. The default name is lib.cma
-c
Only compilation, no build phase. Source files are converted to compiled files, but an executable file is not created.
-custom
In default mode, the linker creates a bytecode for execution by the camlrun shared system. In this mode, the resulting file contains both bytecode and the runtime system.
-g
Adds debugging information during compilation and linking.
-i
The compiler displays all defined names when compiling
-impl filename
Compile the specified file as an implementation, even if its extension is different from .ml.
-intf filename
Compile the specified file as an interface, even if its extension is different from .mli.
-linkall
Force compilation of all modules in libraries.
-noassert
Disables assertion validation and claims do not compile.
-nolabels
Ignore optional labels in types.
-o exec-file
The name of the file created by the linker.
-rectypes
Allows arbitrary recursive types during type checking.
-thread
Compiles or compiles multi-threaded programs using the thread library
-v
Prints the compiler version number and path to the standard library
-where
Prints the path to the standard library
OCaml interpreter:
ocaml is an interactive Objective CAML system. In this mode, the system reads Caml phrases from input, checks type, compiles and executes and, and then outputs the recognized type and value of the result, if any.
OCamlBrowser, browser source and compiled interfaces.
OCamlBrowser performs the following functions:
- Navigation through Objective Caml modules.
- Editing, type checking and viewing the source text.
Here are basically 3 standard tools for programming on Objective Caml.
There is also OCamlDebug and OCamlDoc, a debugger and a document generator. In the following posts,
we will go directly to the language.
psOfficial site - Objective Caml
Tools the CAML of Objective:
* ocamlc,
* ocaml interpreter
* ocamlbrowser
ocamlc, - of Objective Caml language compiler, is essentially a command interface,
receives and processes posledovatelno.Argumenty arguments ending in .mli
are the source files for compilation unit interfaces. Here are the names
exported by compilation units: variable names, data types, etc.
From the A.mli file, the ocamlc compiler will create an A.cmi file with a compiled interface.
Arguments ending in .ml are considered source files for implementations of compilation units.
Implementations contain definitions for names exported by a unit, as well as expressions calculated for their third-party effects. From the A.ml file using ocamlc, an object with bytecode in the A.cmo file will be created later.
Key ocamlc options:
-a
Creates a library (.cma file) from the .cmo object files specified on the command line. The name of the library can be specified using the -o option. The default name is lib.cma
-c
Only compilation, no build phase. Source files are converted to compiled files, but an executable file is not created.
-custom
In default mode, the linker creates a bytecode for execution by the camlrun shared system. In this mode, the resulting file contains both bytecode and the runtime system.
-g
Adds debugging information during compilation and linking.
-i
The compiler displays all defined names when compiling
-impl filename
Compile the specified file as an implementation, even if its extension is different from .ml.
-intf filename
Compile the specified file as an interface, even if its extension is different from .mli.
-linkall
Force compilation of all modules in libraries.
-noassert
Disables assertion validation and claims do not compile.
-nolabels
Ignore optional labels in types.
-o exec-file
The name of the file created by the linker.
-rectypes
Allows arbitrary recursive types during type checking.
-thread
Compiles or compiles multi-threaded programs using the thread library
-v
Prints the compiler version number and path to the standard library
-where
Prints the path to the standard library
OCaml interpreter:
ocaml is an interactive Objective CAML system. In this mode, the system reads Caml phrases from input, checks type, compiles and executes and, and then outputs the recognized type and value of the result, if any.
OCamlBrowser, browser source and compiled interfaces.
OCamlBrowser performs the following functions:
- Navigation through Objective Caml modules.
- Editing, type checking and viewing the source text.
Here are basically 3 standard tools for programming on Objective Caml.
There is also OCamlDebug and OCamlDoc, a debugger and a document generator. In the following posts,
we will go directly to the language.
psOfficial site - Objective Caml