diff options
Diffstat (limited to 'man/ocamlc.m')
-rw-r--r-- | man/ocamlc.m | 150 |
1 files changed, 120 insertions, 30 deletions
diff --git a/man/ocamlc.m b/man/ocamlc.m index c5c8c435b4..fb3902a888 100644 --- a/man/ocamlc.m +++ b/man/ocamlc.m @@ -209,10 +209,19 @@ file can be used with the emacs commands given in .B emacs/caml\-types.el to display types and other annotations interactively. .TP -.B \-dtypes -Has been deprecated. Please use -.B \-annot -instead. +.B \-bin\-annot +Dump detailed information about the compilation (types, bindings, +tail-calls, etc) in binary format. The information for file +.IR src .ml +is put into file +.IR src .cmt. +In case of a type error, dump +all the information inferred by the type-checker before the error. +The annotation files produced by +.B \-bin\-annot +contain more information +and are much more compact than the files produced by +.BR \-annot . .TP .B \-c Compile only. Suppress the linking phase of the @@ -234,8 +243,10 @@ option to the C linker when linking in "custom runtime" mode (see the .B \-custom option). This causes the given C library to be linked with the program. .TP -.B \-ccopt -Pass the given option to the C compiler and linker, when linking in +.BI \-ccopt \ option +Pass the given +.I option +to the C compiler and linker, when linking in "custom runtime" mode (see the .B \-custom option). For instance, @@ -244,6 +255,11 @@ causes the C linker to search for C libraries in directory .IR dir . .TP +.B \-compat\-32 +Check that the generated bytecode executable can run on 32-bit +platforms and signal an error if it cannot. This is useful when +compiling bytecode on a 64-bit machine. +.TP .B \-config Print the version number of .BR ocamlc (1) @@ -293,6 +309,11 @@ executable file, where .BR ocamlrun (1) can find it and use it. .TP +.BI \-for\-pack \ ident +This option is accepted for compatibility with +.BR ocamlopt (1) +; it does nothing. +.TP .B \-g Add debugging information while compiling and linking. This option is required in order to be able to debug the program with @@ -370,6 +391,12 @@ bytecode executables produced with the option .B ocamlc\ \-use\-runtime .IR runtime-name . .TP +.B \-no\-app\-funct +Deactivates the applicative behaviour of functors. With this option, +each functor application generates new types in its result and +applying the same functor twice to the same argument yields two +incompatible structures. +.TP .B \-noassert Do not compile assertion checks. Note that the special form .B assert\ false @@ -390,6 +417,12 @@ and pass the correct C libraries and options on the command line. Ignore non-optional labels in types. Labels cannot be used in applications, and parameter order becomes strict. .TP +.B \-nostdlib +Do not include the standard library directory in the list of +directories searched for compiled interfaces (see option +.B \-I +). +.TP .BI \-o \ exec\-file Specify the name of the output file produced by the linker. The default output name is @@ -443,8 +476,10 @@ extension .ppi for an interface (.mli) file and .ppo for an implementation (.ml) file. .TP .BI \-ppx \ command -Pipe abstract syntax tree through preprocessor +After parsing, pipe the abstract syntax tree through the preprocessor .IR command . +The format of the input and ouput of the preprocessor +are not yet documented. .TP .B \-principal Check information path during type-checking, to make sure that all @@ -475,8 +510,13 @@ then the .B d suffix is supported and gives a debug version of the runtime. .TP +.B \-short\-paths +When a type is visible under several module-paths, use the shortest +one when printing the type's name in inferred interfaces and error and +warning messages. +.TP .B \-strict\-sequence -The left-hand part of a sequence must have type unit. +Force the left-hand part of each sequence to have type unit. .TP .B \-thread Compile or link multithreaded programs, in combination with the @@ -510,30 +550,29 @@ invocations of the C compiler and linker in .B \-custom mode. Useful to debug C library problems. .TP -.BR \-vnum \ or\ \-version -Print the version number of the compiler in short form (e.g. "3.11.0"), -then exit. -.TP .B \-vmthread Compile or link multithreaded programs, in combination with the VM-level threads library described in .IR The\ OCaml\ user's\ manual . .TP +.BR \-vnum \ or\ \-version +Print the version number of the compiler in short form (e.g. "3.11.0"), +then exit. +.TP .BI \-w \ warning\-list -Enable, disable, or mark as errors the warnings specified by the argument +Enable, disable, or mark as fatal the warnings specified by the argument .IR warning\-list . Each warning can be .IR enabled \ or\ disabled , and each warning can be -.I marked -(as error) or -.IR unmarked . +.IR fatal or +.IR non-fatal . If a warning is disabled, it isn't displayed and doesn't affect -compilation in any way (even if it is marked). If a warning is enabled, +compilation in any way (even if it is fatal). If a warning is enabled, it is displayed normally by the compiler whenever the source code -triggers it. If it is enabled and marked, the compiler will stop with -an error after displaying the warnings if the source code triggers it. +triggers it. If it is enabled and fatal, the compiler will also stop +with an error after displaying it. The .I warning\-list @@ -549,7 +588,7 @@ between them. A warning specifier is one of the following: .IR num . .BI @ num -\ \ Enable and mark warning number +\ \ Enable and mark as fatal warning number .IR num . .BI + num1 .. num2 @@ -567,7 +606,7 @@ and (inclusive). .BI @ num1 .. num2 -\ \ Enable and mark all warnings between +\ \ Enable and mark as fatal all warnings between .I num1 and .I num2 @@ -584,7 +623,7 @@ The letter may be uppercase or lowercase. The letter may be uppercase or lowercase. .BI @ letter -\ \ Enable and mark the set of warnings corresponding to +\ \ Enable and mark as fatal the set of warnings corresponding to .IR letter . The letter may be uppercase or lowercase. @@ -605,7 +644,7 @@ The warning numbers are as follows. \ \ \ Suspicious-looking end-of-comment mark. 3 -\ \ \ Deprecated syntax. +\ \ \ Deprecated feature. 4 \ \ \ Fragile pattern matching: matching that will remain @@ -699,6 +738,55 @@ pattern. \ \ A non-escaped end-of-line was found in a string constant. This may cause portability problems between Unix and Windows. +30 +\ \ Two labels or constructors of the same name are defined in two +mutually recursive types. + +31 +\ \ A module is linked twice in the same executable. + +32 +\ \ Unused value declaration. + +33 +\ \ Unused open statement. + +34 +\ \ Unused type declaration. + +35 +\ \ Unused for-loop index. + +36 +\ \ Unused ancestor variable. + +37 +\ \ Unused constructor. + +38 +\ \ Unused exception constructor. + +39 +\ \ Unused rec flag. + +40 +\ \ Constructor or label name used out of scope. + +41 +\ \ Ambiguous constructor or label name. + +42 +\ \ Disambiguated constructor or label name. + +43 +\ \ Nonoptional label applied as optional. + +44 +\ \ Open statement shadows an already defined identifier. + +45 +\ \ Open statement shadows an already defined label or constructor. + The letters stand for the following sets of warnings. Any letter not mentioned here corresponds to the empty set. @@ -718,7 +806,7 @@ mentioned here corresponds to the empty set. \ 5 .B K -\ 32, 33, 34, 35, 36, 37 +\ 32, 33, 34, 35, 36, 37, 38, 39 .B L \ 6 @@ -752,7 +840,7 @@ mentioned here corresponds to the empty set. .IP The default setting is -.BR \-w\ +a\-4\-6\-9\-27\-29\-32..39\-42\-44 . +.BR \-w\ +a\-4\-6\-7\-9\-27\-29\-32..39\-41..42\-44\-45 . Note that warnings .BR 5 \ and \ 10 are not always triggered, depending on the internals of the type checker. @@ -768,11 +856,11 @@ the .B \-w option: a .B + -sign (or an uppercase letter) turns the corresponding warnings into errors, a +sign (or an uppercase letter) marks the corresponding warnings as fatal, a .B \- -sign (or a lowercase letter) turns them back into warnings, and a +sign (or a lowercase letter) turns them back into non-fatal warnings, and a .B @ -sign both enables and marks the corresponding warnings. +sign both enables and marks as fatal the corresponding warnings. Note: it is not recommended to use the .B \-warn\-error @@ -781,8 +869,10 @@ compiling your program with later versions of OCaml when they add new warnings. The default setting is -.B \-warn\-error\ -a -(none of the warnings is treated as an error). +.B \-warn\-error\ -a (all warnings are non-fatal). +.TP +.B \-warn\-help +Show the description of all available warning numbers. .TP .B \-where Print the location of the standard library, then exit. |