Commit Graph

1378 Commits (master)

Author SHA1 Message Date
Gabriel Scherer c578cee935 manual: fix broken build caused by GPR #1605 2018-08-27 17:58:39 +02:00
Gabriel Scherer 6744597090
Merge pull request #2007 from Octachron/nme_integers
documentation: move 32/64/native literals out of the extension chapter
2018-08-27 14:57:11 +02:00
octachron e407ab3829 documentation: promote 32/64/native literals
* Move the description of these literals to refman/const.etex and
refman/lex.etex
* Mention their existence in library/builtins.etex
* Add examples to Int32, Int64 and NativeInt module documentation
2018-08-27 11:08:11 +02:00
Gabriel Scherer 3e588dc964 manual: use the caml_example environments in some of the Extension sections 2018-08-27 09:06:50 +02:00
Gabriel Scherer fffd676d3d [minor] manual: simplify the refman/ build system
I wanted to test a caml_tex issue by creating a smaller .etex file
than exten.etex, and got bitten by the fact that the Makefile hardcode
the knowledge that only exten.etex uses caml_example.
2018-08-27 07:42:31 +02:00
Stephen Dolan e9b04bb0d5 Add CODE_CUSTOM_FIXED for fixed-size custom serializers.
As a space optimisation, custom serializers that always consume
the same number of bytes need not send the lengths explicitly.
2018-08-22 10:33:09 +01:00
Gabriel Scherer 5b2248892e build cross-reference-checker during manual-pregen
Many build errors in cross-reference-checker have gone unnoticed
because this program was only built to build the manual itself, which
is not part of the CI testing. (The test that it implements needs the
.aux files produces by LaTeX, which we don't really want to produce
during CI runs.)

This commit adds cross-reference-checker to the `tools` target of
manual/Makefile, which is in turn built by the `manual-pregen` target
of the main Makefile, which contains the sanity checks for the manual
that do not require building it, and is part of our CI.
2018-08-19 19:07:01 +02:00
Gabriel Scherer 1c082929e3 cross-reference-checker: fix attribute structure after GPR #1953 2018-08-19 19:07:01 +02:00
Gabriel Scherer a6d7e60839 cross-reference-checker: fix Location.report_error after GPR #1952 2018-08-19 19:07:01 +02:00
Jeffrey Tsang 40033ad7fb manual: doc clarification (#1984) 2018-08-16 22:45:52 +02:00
Daniel Bünzli 1798999b65 Stdlib: add Option module. 2018-08-08 11:41:09 +02:00
Daniel Bünzli b7affbb9ef Stdlib: add Result module. 2018-08-08 10:34:03 +02:00
Nicolás Ojeda Bär 7820c10aa4 Include fonts in the manual archives 2018-08-03 09:48:58 +02:00
Nicolás Ojeda Bär 45462a5262 Use relative paths for manual fonts 2018-08-02 23:29:30 +02:00
Florian Angeletti 4be6cafcc3
manual, code example preprocessor : full conversion to compiler-libs (#1863)
* manual tools: use toploop directly in caml_tex2
* manual tool: improved error messages
* manual: always print errors and warnings
* fix nefarious interaction with GPR#1120
* move manual/tools/caml_tex2 to tools/caml_tex
* Basic text for caml-tex
2018-07-25 10:38:08 +02:00
Valentin Gatien-Baron 3d0299a185 Create warning 64, for uses of -unsafe with a -pp that returns a marshalled ast
Instead of the current print to stderr. This way it's treated the same
as other warnings: it has a position, colors, can be made an error,
disabled, goes in the expected formatter, is documented.
2018-07-15 15:08:38 -04:00
whitequark 1ebc9f5a4c Remove the Sort module. (PR7812)
It has been deprecated since 2000, shown a deprecation warning
since 4.02, and Sort.merge is documented to have undefined behavior
when the lists being merged are not sorted in the first place.
2018-07-13 16:04:49 +02:00
Perry E. Metzger a2c2fb7e8e manual: fixes for the .svg arrow files hevea now generates
manual/Makefile: add *.svg to the clean target for htmlman directory
    manual/htmlman/.gitignore: add *.svg
2018-07-09 09:07:07 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
Sébastien Hinderer c8343888fa manual/tools/texquote2: reimplement the tool in OCaml 2018-06-26 16:15:23 +02:00
Gabriel Scherer 2fa1dde9d9 manual: rewrite forgotten references to 'pdfmanual' (now 'manual') 2018-06-26 11:17:40 +02:00
Sébastien Hinderer 28c337fecb manual/README.md: stop mentionning the DVI manual
This is a follow-up to commit 2f0d65c7ee
in GPR #1842.
2018-06-26 07:25:22 +02:00
Sébastien Hinderer 85fa27f7e9 Rename C compiler related build variables
This commit renames a few C compiler related build variables so that
they are reserved for the build system. They will then be re-introduced,
but this time as user varialbes whose value can be freely customized
when compiling the package, without risking to conflict with those
command-line flags that are required by the build system itself.

Here are the variables this commit renames:

- CFLAGS -> OC_CFLAGS
- CPPFLAGS -> OC_CPPFLAGS
- LDFLAGS -> OC_LDFLAGS

Note: before this commit the compilation of scheduler.c in
otherlibs/threads was relying on make's implicit rule to compile C files.

Since this commit stops using the standard variables for flags,
it is necessary to introduce an explicit rule to compile C files
and that makes use of the newly introduced variables.
2018-06-20 14:01:42 +02:00
Florian Angeletti 9e67f4e942
Manual: update the exception section in the tutorial (#1831)
* exception cases
* local exceptions
* more exception examples
2018-06-19 20:11:07 +02:00
Xavier Leroy 570fe9f57b Remove old PDF-related macros that are no longer relevant
In the early days of pdflatex, the hyperref package didn't exist
and we used the \pdfchapter, \pdfchapterfold and \pdfsection
custom macros to build the PDF index.

Those macros are now useless, so remove all of their uses.
2018-06-16 10:36:00 +02:00
Xavier Leroy c0a8a2f41e Remove traces of the pre-Hevea plaintext version of the manual
Before Hevea the plaintext version of the manual required a
specific toplevel file "plaintext.tex", some \ifplaintext
conditionals, and a "plaintext.sty" package.
All this is now useless, remove it.
2018-06-16 10:35:21 +02:00
Xavier Leroy 2f0d65c7ee Get rid of the DVI and Postscript versions of the manual
Those formats are now obsolete compared with PDF.

- Merge pdfmanual.tex into manual.tex and remove pdfmanual.tex
- Simplify the Makefile: run with pdflatex only, not latex then pdflatex
- Remove mentions of DVI and Postscript versions on the HTML front page
2018-06-15 15:12:08 +02:00
Xavier Leroy ad5d93af99 Use Type 1 (vector) fonts for Computer Modern Roman, not Type 3 (bitmap)
By default, \usepackage[T1]{fontenc} causes CMR bitmap fonts to be put
in PDF and PS files.  Fix this using the "ae" package
(virtual fonts for T1 encoded CMR-fonts).
2018-06-15 14:56:26 +02:00
octachron a555152a4b manual: explicit subsection for precedence table 2018-06-12 21:25:43 +02:00
Gabriel Scherer 12e9c1d19a match-context-args: have --help refer to the (reworded) manual 2018-06-02 00:02:47 +02:00
Dwight Guth 6a06a1123a add advanced option to tune performance of pattern matching compiler in case of exponential blowup 2018-06-01 23:51:56 +02:00
Perry E. Metzger 262b70d819 Document that -safe-string is the default, -unsafe-string is not
Nearly identical changes to:
   ocaml.m, ocamlc.m, ocamlopt.m, unified-options.etex

"-safe-string" has been the default since 4.06, so the assertion that
it would be the default someday, and that "-unsafe-string" is still
the default, was incorrect.
2018-06-01 14:05:08 +02:00
Mark Shinwell e7d6ceadce Rework of PR1020 2018-05-30 17:32:21 +01:00
Florian Angeletti 1d27ddef10
manual: move quoted string to the main chapters (#1788)
* manual: itemize the list of basic data types
2018-05-25 21:15:35 +02:00
Sébastien Hinderer 73620c1591 Add the -m and -M command-line options to ocamlrun
- -m shows the magic number of the bytecode executable given as argument

- -M shows the magic number this runtime expects
2018-05-25 14:14:25 +02:00
Gabriel Scherer 58c105e7e4
Merge pull request #1789 from Octachron/manual_utf8_encoding
manual: switch to utf-8 encoding
2018-05-20 19:57:01 +02:00
octachron f21f05a6ae Fix forgotten latin1 byte sequences 2018-05-20 16:41:57 +02:00
octachron 5486d3fe27 manual: switch to utf-8 encoding 2018-05-20 14:52:04 +02:00
stdowl bd204c7939
Merge branch 'trunk' into html-manual 2018-05-20 10:49:54 +02:00
steinuil b517e0fff1 manual: cleanup of main Makefiles 2018-05-19 21:48:18 +02:00
steinuil 1717ccd628 manual: improve consistency in the Makefiles 2018-05-19 21:48:18 +02:00
steinuil 478b14ef93 manual: delete old .cvsignore files 2018-05-18 20:27:35 +02:00
steinuil 3b74227b61 manual: fix typo in README 2018-05-18 20:27:35 +02:00
steinuil 2d9d48cd3c manual: add clean target to tests 2018-05-18 20:27:30 +02:00
steinuil eb789250e1 manual: delete unused tools 2018-05-18 20:27:30 +02:00
Charles Chamberlain 25ef453068 Change font size for pre's back to 1rem 2018-05-15 16:24:10 +00:00
Charles Chamberlain 600fea6ce0 Use em, not rem, for inline monospace 2018-05-15 16:24:10 +00:00
Charles Chamberlain b2cefc81a0 Adding comment in manual style 2018-05-15 16:24:10 +00:00
Charles Chamberlain 2a271b4884 Change font size of inline monospace text 2018-05-15 16:24:10 +00:00
Charles Chamberlain f2d36b0486 Improve font size of pre elements in html manual 2018-05-15 16:24:10 +00:00
Charles Chamberlain f5d7c7957f Smaller body size, smaller text size, and wrap pre 2018-05-15 16:24:10 +00:00
Charles Chamberlain 00d1fdd4a7 Change libref headings to relative font size 2018-05-15 16:24:10 +00:00
Charles Chamberlain bb7c1c2c26 Change html manual to use relative font sizes 2018-05-15 16:24:10 +00:00
Gabriel Scherer 83b0ee1b62
Merge pull request #1779 from pmetzger/bigardocfix
Integrate Bigarray documentation
2018-05-14 10:31:38 +02:00
Perry E. Metzger 1a412be026 Integrate Bigarray documentation
1. Add Bigarray lines to library/stdlib.etex
2. Move intro from libbigarray.etex to stdlib/bigarray.mli
3. Note that 0-dimensional arrays are supported.
4. Move C interface description to cmds/intf-c.etex
5. Change wording in libbigarray.etex to reflect legacy status.
6. Add a label to libunix.etex (needed for link from libbigarray.etex)
7. Put the changes in Changes (for 4.07).
2018-05-10 15:13:56 -04:00
Perry E. Metzger 0fad94e80a unix library documentation: move HTML links higher up on the page (#1780) 2018-05-10 11:09:20 +02:00
octachron 3b6236e484 fix indentation 2018-05-07 10:49:48 +02:00
octachron 1edd1e69da partial revert on exten.etex 2018-05-07 09:30:30 +02:00
octachron c7a641d198 manual: use [@@@ellipsis] 2018-05-07 09:27:36 +02:00
octachron 18b5d64df2 manual: check all nested ellipses early 2018-05-07 09:25:31 +02:00
octachron 8d20b53234 manual: ellipis for subset of underline interval 2018-05-06 23:56:21 +02:00
octachron f40d1d1c99 Add ellipsis to caml_example pseudo-env 2018-05-06 20:38:19 +02:00
Florian Angeletti 145bedc2ae
manual: signature option for caml_example (#1702)
* Signature option for caml_example
* convert ocamldoc code example to caml_example
* error message when using caml_example*{signature} without *
2018-05-05 21:50:40 +02:00
Gabriel Scherer eb62d2e90d
Merge pull request #1693 from lpw25/fix-mpr7701
Keep documentation comments in structures with no other items (MPR#7701 cont.)
2018-05-05 15:45:57 +02:00
Charles Chamberlain 5317b717f6 Host fonts in the manual, add line to Changes 2018-05-04 23:41:18 -05:00
Charles Chamberlain c24c911bf6 Select main title better; scroll overflow for tables 2018-05-04 16:20:20 -05:00
Charles Chamberlain 1e32d1614b Format stdlib pages, use font cdn, switch bg color 2018-05-03 21:08:29 -05:00
Charles Chamberlain d9333f9fdc Add backgrounds and move to darker blue links 2018-05-03 20:16:51 -05:00
Charles Chamberlain 9632c889d8 Fix the order of \input{macros.tex} and meta tag 2018-05-03 12:57:33 -05:00
Charles Chamberlain 980afa8f19 Style the html manual, changing type and layout
Add a new font for the headers, change the link colors,
re-center it, and improve support for mobile viewing.
2018-05-03 12:22:44 -05:00
Gabriel Scherer 559206b4e0 ocamlc -config: new -config-var option to print specific configuration variables
The proposed behavior of `-config-var s` is as follows:
- if `s` is an existing configuration variable, print its value as
  a string and exit with a success return value (0)
- if `s` is not an existing configuration variable, print nothing
  and exit with a failure return value (non-0)

Note that we do not print a newline after the value of the
configuration variable. In particular, if the value is an empty
string, the output is undistinguishable from the output for
non-existing variables, the return value has to be considered instead.

The following alternative behaviors were considered:

- We could print a newline after the configuration value, which
  would let users distinguish empty values from non-existing variables
  by counting the lines of output, and would also be more pleasant for
  users invoking the option from the command-line. However, the way
  bash works on Windows means that $(ocamlc -config-var foo) would keep
  a trailing \r in its output, and portable scripts would have to use
  $(ocamlc -config-var foo | tr -d '\r') instead, which is a pain.
  (This issue was pointed out by David Allsopp)

- We could print a message on the error output if the configuration
  variable does not exist. This is clearer to a human user, but it is
  annoying for scripts if they forget to silence the error output and
  get their output mixed with our error messages. The main use of this
  new feature is for scripting purposes.
2018-04-27 19:54:08 +02:00
steinuil 49abafc587 html manual: improve typesetting and legibility
Make the pages narrower to avoid overly long lines,
increase line height to improve legibility.
2018-04-27 11:59:58 +02:00
Perry E. Metzger 24a551c0ef Fix a grammar error in the description of inline records. (#1734) 2018-04-23 17:32:29 +01:00
Florian Angeletti c5b3dada13 cleanup stdlib documentation makefiles (#1700) 2018-04-12 11:02:16 +01:00
Gabriel Scherer 482e8a8b52 manual Makefiles: set LD_PATH to protect from stale installs
Trying to build the manual (make -C manual/manual etex-files) when
your current opan switch is stale (for example, 4.05.0 when working on
the current 4.07.0+dev trunk) results in the following error:

    make[1]: Entering directory '/home/gasche/Prog/ocaml/github-trunk/manual/manual/tutorials'
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating coreexamples.tex
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating lablexamples.tex
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating objectexamples.tex
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating moduleexamples.tex
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating advexamples.tex
    Fatal error: cannot load shared library dllunix
    Reason: /home/gasche/.opam/4.05.0/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_strdup
    Failure when generating polymorphism.tex
    make[1]: Leaving directory '/home/gasche/Prog/ocaml/github-trunk/manual/manual/tutorials'

This PR fixes the issue by using Makefile.tools' SET_LD_PATH variable
to set a LD_PATH containing the required build directory's otherlibs/
libraries, instead of looking in an installed path.

(no change entry needed)
2018-04-09 19:55:40 +02:00
Florian Angeletti 6e927dcdb0
MPR#7663: reword unsafe recursive modules message (#1694) 2018-04-04 21:15:26 +02:00
Leo White 070416d6bb Fix syntax errors in ocamldoc examples 2018-04-03 17:00:02 +01:00
Gabriel Scherer b4a1d2fcc9
Merge pull request #1692 from Octachron/manual_seq
manual: links to Seq in stdlib.etex
2018-04-03 14:02:47 +02:00
octachron ee898e3b98 manual: links to Seq in stdlib.etex 2018-04-03 13:41:09 +02:00
Florian Angeletti aa484302a7
MPR#7613, manual: minor rewording of refutation case (#1677) 2018-04-01 16:01:10 +02:00
Florian Angeletti 6d65f789f0
manual: record and variant disambiguation (#1647)
This commit adds a subsection to the record and variant section of the manual describing the behavior of the type-directed disambiguation of variant constructors and record fields.
2018-03-18 20:50:56 +01:00
Nicolás Ojeda Bär 37541310b4
Merge pull request #1653 from nojb/deprecate_thread_option
Deprecate -thread option
2018-03-16 06:31:37 +01:00
Nicolás Ojeda Bär 6c1bec42c7 Deprecate -thread option, equivalent to -I +threads 2018-03-15 18:37:02 +01:00
Nicolás Ojeda Bär 94dc90d735 Add missing manual entries 2018-03-15 18:26:52 +01:00
Nicolás Ojeda Bär b27733747c Add manual entry 2018-03-15 18:26:52 +01:00
Timothy Bourke ac6c864279 Doc for caml_alloc_final: allocates n + 1 words
The current documentation for caml_calloc_final, fixed by this commit,
contradicts the documentation for caml_calloc_custom:

  Custom blocks must be allocated via the caml_alloc_custom function:
  caml_alloc_custom(ops, size, used, max) returns a fresh custom block,
  with room for size bytes of user data...

The caml_alloc_final function is defined as follows:

CAMLexport value caml_alloc_final (mlsize_t len, final_fun fun,
				   mlsize_t mem, mlsize_t max)
{
  return caml_alloc_custom(caml_final_custom_operations(fun),
			   len * sizeof(value), mem, max);
}

And the caml_alloc_custom function begins as follows:

CAMLexport value caml_alloc_custom(struct custom_operations * ops,
                                   uintnat size,
                                   mlsize_t mem,
                                   mlsize_t max)
{
  mlsize_t wosize;
  value result;

  wosize = 1 + (size + sizeof(value) - 1) / sizeof(value);
  ...

It adds the extra word to store the custom_operations.
2018-03-14 11:52:16 +01:00
Gabe Levi c9d911ec24
Manual: Fix typo in Chapter 8 Language extensions
I believe this change reflects the original author's intent. The example is trying to demonstrate that the `[@bar]` attribute applies to the function definition, not to the extension itself.
2018-03-08 10:53:26 -05:00
objmagic 0993cd9ba9 Support empty variants (#1546)
* Allow empty variants.
* Update manual and ocamldoc.
2018-03-06 10:48:16 +09:00
octachron 8f2a15369f Factorize the build of the unprefixed stdlib
which is used by both ocamldoc and the reference manual.
2018-02-12 08:29:16 +00:00
octachron e95b0c4769 Minimal fix for the manual build pocess 2018-02-12 08:29:16 +00:00
Jeremie Dimino 225d1c65b9 Prefix the compilation unit names of all modules in the stdlib
Except for the Camlinternal* modules and the new Stdlib module, all
modules in the stdlib now compile to Stdlib__<module>.

Pervasives is renamed to Stdlib and now contains a list of aliases
from the long names to the short ones, so that from inside and outside
the stdlib we can refer to the standard modules as just List or
Stdlib.List rather than Stdlib__list.

In order to avoid printing the long names in error messages and in the
toplevel, the following heuristic is added to Printtyp: given a path
Foo__bar, if Foo.Bar exists and is a direct or indirect alias to
Foo__bar, then prefer Foo.Bar.

A bootstrap step was required to replace Pervasives by Stdlib as the
module opened by default.
2018-02-12 08:29:16 +00:00
Yuriy Vostrikov 3899948207 Fix minor typo 2018-02-09 19:46:52 +03:00
Jim 52454d3742 Improve wording in several places in the OCaml manual, mostly in chapter
1.
PR#7698
2018-01-25 10:47:57 -08:00
David Allsopp 617c461bb1 s/an Unicode/a Unicode/ 2018-01-19 13:55:50 +00:00
Gabriel Scherer 39e56ac9c0 manual/README.md: minor rendering bug 2018-01-05 22:36:29 +01:00
octachron 4997f9239a manual: new consistency test for cross-references 2018-01-04 12:46:57 +01:00
Jakub Wilk 040de1f860 Manual: fix obsolete reference to "curses.mli" 2017-12-30 18:03:05 +01:00
Florian Angeletti 17cf59c306
manual examples:decouple verbatim/toplevel styles (#1540) 2017-12-21 16:14:49 +01:00
octachron 929b0adee5 manual, remove dangling reference
This commit removes a dangling reference to the explicitly overriding
method definition that was moved to the tutorial part of the manual.
2017-10-27 18:57:52 +02:00
Nicolás Ojeda Bär daeebabb62 Add C stubs Unicode guidelines to manual (#1450)
Add C stubs Unicode guidelines to manual
2017-10-27 17:52:19 +02:00
Xavier Leroy 94270d6f7e Update section 11.5 (differences between ocamlopt and ocamlc)
Discuss FMA and also the issue from MPR#7271.
2017-10-19 16:13:59 +02:00
Gabriel Scherer d229144189 Merge pull request #1344 from nojb/linscan_flag_manual
Add -linscan doc to manual
2017-10-16 09:27:02 +02:00
Florian Angeletti 2675b1f10b GPR#594, manual: new chapter on polymorphism
This commit adds a new chapter to the tutorial part of the manual, describing potential issues that can appear with polymorphic functions and types, and possible solutions or  workarounds. The issues covered are, section-by-section:
* weakly polymorphic types
* polymorphic recursion
* higher-ranked polymorphic function
2017-10-16 08:36:37 +02:00
Markus Mottl a62e31abf9 Improved documentation of unboxed and noalloc attributes 2017-10-11 12:25:19 -04:00
octachron e30e82a219 PR#7363: start documentation headers at {1 2017-10-04 13:05:05 +02:00
octachron 03e1a93f0b PR#7363, ocamldoc: implicit level 0 for titles
This commit makes the heading hierarchy of ocamldoc start at {0 rather
than {1. This level {0 should be reserved for global titles, freeing
the use of {1 for normal subtitles.
2017-10-03 23:29:50 +02:00
Gabriel Scherer a202aa032b rename the configure-time safe-string options for clarity
-(un)safe-string becomes -(no-)force-safe-string
-(un)safe-string-default becomes -default-unsafe-string

Config.safe_string (and Clflags.unsafe_string) keep their name for
backward-compatibility, as well as the C define CAML_SAFE_STRING
(which corresponds to -force-safe-string).
2017-10-02 14:42:19 +02:00
Fabrice Le Fessant f20a0a042e Allow first character of OCAMLPARAM to specify an alternative separator
The alternative separator must be in ":|; ,".
2017-09-29 13:38:59 +02:00
Leonid Rozenberg efdbb82787 Change factor estimation equation
Currently, the equation is rendered as (1/1 + f)<sup>d</sup>.
I'm not certain if this will correctly render in HTML (apologies, but I don't have the capacity to check at the moment), but hopefully this PR will suffice.
2017-09-18 14:41:15 +02:00
octachron 28e53d1305 Add support for qualified indexing operators
aka `x.Module.Path.!(y)` and friends
2017-09-16 23:05:35 +02:00
Florian Angeletti 201ee17fe0 Extended indexing operators (#1064)
* Extended indexing operators

This commit adds extended indexing operators to the parser.
For instance,

```
let (.%()) p (x,y) = p.( x ).( y )
;; p.%(0,0)

```
Extended indexing operators name starts with a leading
dot "." followed by an operator symbol, except "." or "<"
and a sequence of any operators and must be closes with a
couple of enclosing parentheses ( i.e. "()", "[]", "{}" )
and then an optional assignment operator "<-":

  * '.' dotsymbolchar symbolchar* '(' ')' ['<-']
  * '.' dotsymbolchar symbolchar* '[' ']' ['<-']
  * '.' dotsymbolchar symbolchar* '{' '}' ['<-']

Similarly, expressions of the form

* expr_1 '.' dotsymbolchar symbolchar* '(' expr_2 ')'
* expr_1 '.' dotsymbolchar symbolchar* '[' expr_2 ']'
* expr_1 '.' dotsymbolchar symbolchar* '{' expr_2 '}'

and

* expr_1 '.' dotsymbolchar symbolchar* '(' expr_2 ')' '<-' expr_3
* expr_1 '.' dotsymbolchar symbolchar* '[' expr_2 ']' '<-' expr_3
* expr_1 '.' dotsymbolchar symbolchar* '{' expr_2 '}' '<-' expr_3

are desugared to

* ('.' dotsymbolchar symbolchar* '(' ')' ) expr_1 expr_2
* ('.' dotsymbolchar symbolchar* '[' ']' ) expr_1 expr_2
* ('.' dotsymbolchar symbolchar* '{' '}' ) expr_1 expr_2

and

* ('.' dotsymbolchar symbolchar* '(' ')' '<-' ) expr_1 expr_2 expr_3
* ('.' dotsymbolchar symbolchar* '[' ']' ) expr_1 expr_2 expr_3
* ('.' dotsymbolchar symbolchar* '{' '}' '<-' ) expr_1 expr_2 expr_3
2017-09-15 18:47:05 +02:00
Leo White 20668002bb Turn off warning 40 by default (#1333)
* Turn off warning 40 by default
2017-09-15 18:41:49 +02:00
Nicolas Ojeda Bar 2c371b7104 Add -linscan doc to manual and man page 2017-09-15 18:07:25 +02:00
Leo White 5cb27d8ebb Merge pull request #792 from sliquister/generalize-destr-subst2
Fixing the limitations on destructive substitutions
2017-09-15 09:29:29 +01:00
Florian Angeletti 588c23117b Merge pull request #1231 from Octachron/hello_κόσμος
Toplevel: only escapes bytes and not strings
2017-09-13 23:24:24 +02:00
octachron 2e6a78aa18 toplevel: only escapes bytes and not strings
Escaping strings when printing them in the toplevel has the disadvantage
of mangling unicode text:

```
\# "한글";;
- : string = "\237\149\156\234\184\128"
```

With this commit, strings are not escaped anymore, contrarily to bytes:

```
\# let cosmos = "κόσμος";;
cosmos : string = "κόσμος"
\# Bytes.of_string cosmos;;
- : bytes =
Bytes.of_string "\206\186\207\140\207\131\206\188\206\191\207\130"
```

This new behavior can be disabled dynamically by setting the environment
variable OCAMLTOP_UTF_8 to false

This change is not solely aesthetic: the mangling of unicode string may
contribute to the impression of some OCaml newcomers that Ocaml has no
support for unicode.
2017-09-12 22:28:18 +02:00
alainfrisch 80eeb3af48 Document that some warnings cannot be controlled by ocaml.warning. 2017-09-12 00:36:46 +02:00
alainfrisch 478efb5646 Doc. 2017-09-12 00:36:46 +02:00
alainfrisch b074e5666a Documentation. 2017-09-12 00:36:46 +02:00
Leo White d41c41c172 Add private extensible variants 2017-09-11 13:29:56 +01:00
Xavier Leroy 4d4cf60445 Minor rewording 2017-08-22 20:12:45 +02:00
octachron c183f0cb8e manual: update after the separation of Num 2017-08-21 14:09:22 +02:00
Christophe Troestler 1dffd7dcdf Make clear "toplevel" = "REPL" in the TOC (#1276) 2017-08-04 09:37:50 +01:00
yallop 65c932253b String_val: return 'const char *' when -safe-string is globally enabled (#1274) 2017-08-03 14:19:13 +01:00
Valentin Gatien-Baron 45f21c6d2b Teach Changes, ocamldoc and the manual about deep destructive substitutions 2017-08-01 07:40:14 -04:00
Vincent Jacques 66f2090609 Reference manual: re-add \\
As noted by @Octachron
2017-07-24 15:26:46 +02:00
Vincent Jacques 1f59f2498b Reference manual: fix grammar in Language extensions
No change entry needed
2017-07-21 19:10:06 +02:00
Vincent Jacques 7a14d5b4e7 Reference manual: fix syntax errors in grammar 2017-07-21 18:13:09 +02:00
Alain Frisch d6d1739c0b Merge branch 'trunk' into string-unicode-escapes 2017-07-20 15:23:35 +02:00
Alain Frisch fd47ba9649 Support 'let open' in class and class type expressions (#1249)
* Support 'let open' in class and class type expressions.

* Adapt ocamlprof.

* Adapt ocamldoc.

* Add tests.

* Changelog.

* Manual.
2017-07-20 08:17:30 +02:00
Daniel Bünzli dae520ca12 Add Unicode character escape \u{X+} to OCaml string literals.
The syntax of string literals is changed to add the \u{X+} escape
sequence which replaces the escape by the UTF-8 encoding of the
Unicode scalar value denoted by the hexadecimal number H made of one
to six lower or uppercase hexadecimal digits.

Unfortunately due to OCaml lax policy about escape sequences this
change can break program that trigger warning 14 on compilation. More
precisely programs which have literals with "\u" as a substring will
now either fail or the string literal will be silently compiled to
another representation in case the literal has a subsequence that
respects the \u{X+} syntax.
2017-07-20 01:11:30 +02:00
Damien Doligez f78128a7d7 merge 4.05 into trunk 2017-07-18 13:03:54 +02:00
Ng Zhi An dbbaae9648 Clarify ocamldoc -keep-code behavior 2017-07-12 17:19:58 +08:00
Damien Doligez fee01100fb Some tweaks for MPR#7557 (#1213)
* fall back to __secure_getenv when secure_getenv is not available

* use secure_getenv for instrumented runtimes

* documentation: warn against setting the setuid or setgid bits on custom bytecode executables
2017-06-28 14:08:07 +02:00
Damien Doligez cf100bae04 Some tweaks for MPR#7557 (#1213)
* fall back to __secure_getenv when secure_getenv is not available

* use secure_getenv for instrumented runtimes

* documentation: warn against setting the setuid or setgid bits on custom bytecode executables
2017-06-28 14:02:15 +02:00
Damien Doligez ac6dbd49ac small typo in manual 2017-06-23 17:51:38 +02:00
Florian Angeletti 8b11050021 GPR#1205: manual, remove last remnants of labltk (#1205) 2017-06-16 13:56:32 +01:00
Gabriel Scherer 139e281d20 manual: fix parallel make in manual/library
The rule said:

$(INTF): $(MLIS)
	$(OCAMLDOC) -latex [...] $(MLIS)
        # renaming of files
       	mv -f Arith_status.tex Arithstatus.tex
	mv -f Big_int.tex Bigint.tex
	mv -f Ast_helper.tex Asthelper.tex
	mv -f Ast_mapper.tex Astmapper.tex

If two targets executed at the same time depend on different files in
INTF, this rule would be executed several time in parallel, and in
particular the calls to `mv -f ...` would race with each other,
resulting in a build failure.

Now the $(OCAMLDOC) call is made unique by using a single target:

$(INTF): interfaces
interfaces: $(MLIS)
	$(OCAMLDOC) -latex [...] $(MLIS)
        [...]

Note that parallel build does not improve the build speed on my
machine; but it can still make people more productive by not breaking.
2017-06-15 07:30:58 -04:00
Gabriel Scherer ee1b6e5643 manual: build using ocamldoc.opt when available
On my machine, "make clean; make html" goes from 30s to 11s
2017-06-15 07:22:30 -04:00
octachron 488dbd9fe3 GPR#1194: update Changes and manual/README.md 2017-06-07 18:31:03 +02:00
octachron 41c042c596 GPR#1194: caml_example make mode non-optional 2017-06-07 18:14:16 +02:00
octachron 80b394c6c7 MPR#7551: allow caml_example to omit final ";;"
This commit makes it possible to omit the final ";;" in a caml_example
environment.

By default, this final ";;" is still mandatory. A new command line
option "-implicit-stop" makes it optional globally.

This global setting can be overrided locally by adding an optional
argument to the environment:

* [toplevel] makes the ";;" mandatory
* [verbatim] makes it optional

The tutorial part of the manual is configured to use the mandatory ";;"
mode globally for the sake of consistency whereas the language extension
section uses the new optional ";;" mode.
2017-06-07 16:44:28 +02:00
Gabriel Scherer 2072b5d063 Merge pull request #1187 from Octachron/document_plugins
Manual: minimal documentation for compiler plugins
2017-06-04 10:43:59 -04:00
Sébastien Hinderer 5c268a210e Documentation fix: cmti files
The documentation for the -bin-annot option did only mention .cmt files,
not .cmti ones.
2017-06-02 11:44:10 +02:00
octachron df3f4b9f61 GPR#1187: document command line flags for plugins 2017-06-01 23:24:12 +02:00
octachron 7a2a68a513 GPR#1187: describe lambda plugin hooks 2017-06-01 23:12:10 +02:00
octachron 1a4dc2fa26 GPR#1187: cite typemod and pparse plugin hooks 2017-06-01 22:43:30 +02:00
octachron 019ba2f3f6 GPR1187: Typos 2017-06-01 18:59:21 +02:00
octachron 60ad2d8145 GPR#1187: Minimal documentation for compiler plugins 2017-06-01 18:22:09 +02:00
Fabrice Le Fessant 8daa184d95 New -depend option for ocamlc/ocamlopt 2017-06-01 15:56:30 +02:00
octachron 93701df022 Manual: fix dead links in ocamldoc chapter 2017-05-24 18:02:45 +02:00
Olivier Andrieu eb009761d4 Win64 stack overflow detection (#938) 2017-05-09 14:34:56 +01:00
octachron fbaf3cd195 PR#6548, manual: remove obsolete comment
Remove a comment on an obsolete limitation of private type
abbreviations in the extension section of the manual.
2017-05-08 15:26:49 +02:00
Rob Blanco adc073dbcc Fixed typos in manual (#1151) 2017-05-08 10:15:49 +01:00
Florian Angeletti 2dc8621117 PR#6676: move overriding class definitions to language reference chapter (#1153) 2017-05-04 16:49:25 +01:00
Mark Shinwell 3efe66e043 Remove SPARC backend 2017-04-10 09:18:13 +01:00
Rob Blanco 6f8be23dff Fix typo in coreexamples.etex 2017-04-04 11:45:44 +02:00
Gabriel Scherer b91fd33ec7 Merge pull request #1134 from robblanco/manual-tutorial-typos
A couple of typos found in the manual tutorials
2017-04-03 13:43:28 -04:00
Rob Blanco 762d003193 Typo in advexamples.etex 2017-04-03 19:37:40 +02:00
Rob Blanco 1df87e0c1a Typo in lablexamples.etex 2017-04-03 16:15:20 +02:00
Rob Blanco f07978835b Fix typo in coreexamples.etex 2017-04-01 18:23:57 +00:00
Gabriel Scherer 67e52c70cb Merge pull request #1112 from Octachron/nme_open_and_include
PR#6676: manual, move local and overriding opens to tutorial
2017-03-31 10:30:56 -04:00
octachron 7daf6a0ea7 Manual: fix link to Ast mapper module 2017-03-31 14:18:08 +02:00
Sébastien Hinderer 8868a7c023 Rename the BYTECCLINKOPTS build variable to LDFLAGS 2017-03-29 11:10:05 +02:00
Sébastien Hinderer ec6b25b7a0 Get rid of the NATIVECCLINKOPTS build variable.
This variable is empty and actually never used in the build system.
2017-03-29 11:10:05 +02:00
Max Mouratov e56a7bd34e manual: fixed a memory leak inside an example 2017-03-29 09:01:15 +00:00
octachron 582a414a3e Manual: move local opens to tutorial 2017-03-19 21:16:01 +01:00
octachron bdfff17960 Manual: introduce open and include statement 2017-03-18 18:53:02 +01:00
octachron d1bf97a092 Manual: introduce option type 2017-03-18 16:34:44 +01:00
octachron ef47470abe PR#7497: manual, numbered tables of contents 2017-03-18 13:41:37 +01:00
Max Mouratov 0ad2ea7c05 manual: documented the new flag in OCAMLRUNPARAM 2017-03-17 20:50:16 +05:00
Max Mouratov 742a68a042 manual: documented caml_startup_pooled 2017-03-17 20:50:16 +05:00
Max Mouratov af5899fa8b manual: added a section on unloading the runtime 2017-03-17 20:50:16 +05:00
octachron d069dbe585 MPR#7352,7353: ocamldoc, better paragraphs in html 2017-03-15 19:55:37 +01:00
Florian Angeletti cc905fadcd Merge pull request #802 from Octachron/ocamldoc_semantic_html
MPR#7351: ocamldoc html, use tags rather than <br>
2017-03-15 16:41:11 +01:00
octachron 9d97673b9f PR#7351: ocamldoc html, use tags rather than <br>
This commit replaces most of the use of <br> tags in ocamldoc html
backend by more meaningful tags, in order to improve the themability
of the generated html code.
2017-03-15 15:26:56 +01:00
Hannes Mehnert d377215eda Respect OCAML_COLOR environment variable for deciding whether to use colors
Since 4.03, OCaml supports coloring its messages to standard output and standard
error, depending on the "-color" argument ({always,never,auto}).  This commit
adds support for the environment variable "OCAML_COLOR" (which value can as well
be {always,never,auto}).

The command line argument "-color" takes precedence, "OCAML_COLOR" is only
taken into consideration if no "-color" is provided.

The motivation for this is that the user should have control over coloring
OCaml's output messages.  OCamlbuild, a widely used build tool executes OCaml
not under a tty (and OCaml does not colorize errors and warnings), which lead
various packages use `color(always)` in their `_tags` files, which breaks with
other (non-interactive) programs (i.e.  editor helpers).

Further discussion was done at https://github.com/ocaml/ocamlbuild/issues/87 and
https://github.com/ocaml/ocaml/pull/1098.
2017-03-15 15:02:05 +01:00
Gabriel Scherer 9b16ad12a6 Merge pull request #1098 from hannesm/color-env
Use OCAML_COLOR environment variable for deciding whether to use colors in output
2017-03-15 14:50:09 +01:00
Mark Shinwell 65523392f0 Rudimentary documentation of ocamlnat (PR#7254) (#1096) 2017-03-15 09:56:32 +00:00
Hannes Mehnert 76bf7c568e Respect OCAML_COLOR environment variable for deciding whether to use colors
Since 4.03, OCaml supports coloring its messages to standard output and standard
error, depending on the "-color" argument ({always,never,auto}).  This commit
adds support for the environment variable "OCAML_COLOR" (which value can as well
be {always,never,auto}).

The command line argument "-color" takes precedence, "OCAML_COLOR" is only
taken into consideration if no "-color" is provided.

The motivation for this is that the user should have control over coloring
OCaml's output messages.  OCamlbuild, a widely used build tool executes OCaml
not under a tty (and OCaml does not colorize errors and warnings), which lead
various packages use `color(always)` in their `_tags` files, which breaks with
other (non-interactive) programs (i.e.  editor helpers).

Further discussion was done at https://github.com/ocaml/ocamlbuild/issues/87 and
https://github.com/ocaml/ocaml/pull/1098.
2017-03-15 08:24:13 +00:00
Gabriel Scherer 26fc07c8f7 Merge pull request #1100 from Octachron/nme_record_notation
PR#6676: manual, move record notation to tutorial
2017-03-12 15:22:46 -04:00
octachron 6649e505a8 GPR#1100 updated 2017-03-12 19:52:43 +01:00
octachron c3872a49bb PR#6676: manual, move record notation to tutorial 2017-03-11 18:22:00 +01:00
octachron 97c27ca900 PR#7497: manual, numbered tables of contents 2017-03-10 14:59:59 +01:00
Gabriel Scherer c5cf933a44 Quoted string and extension nodes: manual clarification
This manual clarification is intended to lift up the misunderstanding
that is the basis for #1066.
2017-03-05 14:37:45 -05:00
Gabriel Scherer 1dfb96c0c8 Quoted string and extension nodes: manual clarification
This manual clarification is intended to lift up the misunderstanding
that is the basis for #1066.
2017-03-05 14:37:39 -05:00
Gabriel Scherer d2f837fdc3 -opaque documentation: take Mark's review comments into account 2017-03-05 14:34:57 -05:00
Gabriel Scherer 7c241d322a add a description of -opaque to the manual 2017-03-05 14:34:57 -05:00
Gabriel Scherer 509fb39b53 Merge pull request #989 from gasche/opaque-manual
Opaque manual
2017-03-05 14:31:47 -05:00
Fabrice Le Fessant 9ad1b7be5a ocamldep: add -plugin and use compilerlibs to build (#1015)
* ocamldep: add -plugin argument, and use compilerlibs to build
2017-03-02 16:59:32 +01:00
Fabrice Le Fessant b7b0a64d33 ocamldep: add -plugin and use compilerlibs to build (#1015)
* ocamldep: add -plugin argument, and use compilerlibs to build
2017-03-02 16:45:58 +01:00
Gabriel Scherer 3bae6a68b4 -opaque documentation: take Mark's review comments into account 2017-02-24 21:55:14 -05:00
Gabriel Scherer aff3bd3f21 add a description of -opaque to the manual 2017-02-24 21:55:13 -05:00
Damien Doligez 78f9301136 MPR#5712: Document labelled modules (#1049)
* add BytesLabels to the HTML documentation

* add ArrayLabels, BytesLabels, ListLabels, StringLabels to the PDF and text versions of the manual
2017-02-24 11:01:44 +01:00
Xavier Leroy d08ba72a17 Merge pull request #953 from mshinwell/caml_startup_exn
MPR#386: Add caml_startup_exn
2017-02-21 14:14:06 +01:00
Mark Shinwell 766d970e78 Add caml_startup_exn 2017-02-21 11:49:12 +01:00
Xavier Leroy 205339c811 Minor updates in the manual
Foreword: update Windows versions; mention www.ocaml.org Web site
PDFmanual: make hyperlinks less ugly
2017-02-19 11:49:42 +01:00
Xavier Leroy 2b96fc4a8b Use \camlexample...\endcamlexample as the delimiters for Caml output
Previously we used \caml* and \endcaml* but this leads to some mismatches with the output of caml-tex.
2017-02-19 11:49:33 +01:00
Xavier Leroy e419959946 Minor updates in the manual
Foreword: update Windows versions; mention www.ocaml.org Web site
PDFmanual: make hyperlinks less ugly
2017-02-19 11:48:28 +01:00
Xavier Leroy 87af1d922a Use \camlexample...\endcamlexample as the delimiters for Caml output
Previously we used \caml* and \endcaml* but this leads to some mismatches with the output of caml-tex.
2017-02-19 11:46:45 +01:00
Xavier Leroy 83848d410a PR#7347: document new search path in script mode introduced in 4.03
The 4.03 change was PR#6081.
2017-02-18 16:12:17 +01:00
Xavier Leroy 92446f50b4 Toplevel documentation: no OCamlWin, no LC_CTYPE
The OCamlWin GUI no longer exists.
The LC_CTYPE environment variable no longer triggers special Latin-1 printing of characters.
2017-02-18 16:12:08 +01:00
Xavier Leroy f644ab6042 PR#7347: document new search path in script mode introduced in 4.03
The 4.03 change was PR#6081.
2017-02-18 16:10:16 +01:00
Xavier Leroy 5d385f9963 Toplevel documentation: no OCamlWin, no LC_CTYPE
The OCamlWin GUI no longer exists.
The LC_CTYPE environment variable no longer triggers special Latin-1 printing of characters.
2017-02-18 15:52:12 +01:00
octachron 25c49bc42f Document ocamldep's "-shared" option 2017-02-18 08:34:51 +01:00
Gabriel Scherer 40a9130940 Merge pull request #1030 from Octachron/ocaml-manual-forward-refs
PR#6597:  manual, forward references to languages extensions
2017-02-05 23:39:27 +01:00
octachron 2af1943d6f Forward references to type expression extension 2017-02-05 11:14:26 +01:00
octachron 8bfda24496 Forward references to type declaration extension 2017-02-05 11:14:26 +01:00
octachron 187431738a Forward reference to lex extension 2017-02-05 10:57:38 +01:00
octachron fc6257d7a1 Forward references to module extensions 2017-02-05 10:57:38 +01:00
octachron f680d31176 Forward references to module type extensions 2017-02-05 10:57:38 +01:00
octachron 1242bca45f Forward references to classes extension 2017-02-05 10:57:38 +01:00
octachron 0f40f18f19 Forward references to expr extension 2017-02-05 10:57:38 +01:00
octachron 94c0a5b38b Forward reference to pattern extensions 2017-02-05 10:57:38 +01:00
octachron 2efa86e408 Forward references to constant extensions 2017-02-05 10:57:29 +01:00
Xavier Leroy 56ff448d1f Make -linkall applicable to single compilation units
With this commit, "ocamlc -c -linkall" or "ocamlopt -c -linkall" produce object files that have the "force link" flag set.  Once put in library files (.cma/.cmxa), these object files will always be linked when the library is linked, even if no definition from the object file is referenced.  However, other object files in the library can still be removed if none of their definitions are referenced.

In this respect, we get finer-grained control on which object files should always be linked, typically because they contain important initialization code.
2017-01-15 20:48:39 +01:00
Olivier Andrieu a00b0acc6e fix a type error in the code fragment example for inline records 2017-01-12 12:00:23 +01:00
Gabriel Scherer d4cd072d4c Merge pull request #935 from ygrek/termux-build
allow build in termux
2016-12-23 16:53:24 -05:00
octachron 291666ade4 Manual: `%;` infix extension node 2016-12-14 13:14:21 +00:00
Mark Shinwell 866357b769 Spacetime manual page (#884) 2016-12-14 13:14:21 +00:00
Damien Doligez c2f92c8c81 PR#7007, PR#7311: document OCAMLPARAM and ocaml_compiler_internal_params (#879) 2016-12-14 13:14:21 +00:00
Damien Doligez 1bbdac6a1a MPR#7387: [manual] fix several problems with the keyword index (#874)
fix several problems with the keyword index and remove 3 obsolete files
2016-12-14 13:14:21 +00:00
Mark Shinwell 63a9fd9ee3 Document that Store_field cannot be used with CAMLlocalN (#842) 2016-12-14 13:14:21 +00:00
Damien Doligez d117710454 Remove ocamlbrowser from the manual (#839) 2016-12-14 13:14:21 +00:00
Jacques Garrigue b843100a64 Fix manual (MPR7371) and add test case (#835) 2016-12-14 13:14:21 +00:00
Florian Angeletti ecc0acca5c Manual: add spacetime module to the manual (#793) 2016-12-14 13:14:21 +00:00
sliquister d8fc8dce4d MPR#7216: allow syntax Functor(val x) (#949)
* allow syntax Functor(val x)
* manual: mention the first-class module tweak
2016-12-13 17:23:53 +09:00
Stephen Dolan a35c6117e6 Instrumentation for american fuzzy lop (afl-fuzz) (#504) 2016-12-06 17:18:04 +01:00
octachron ac8077c5b7 Detect missing `;;` at the end of caml examples 2016-11-29 19:08:51 +01:00
octachron 68354a560a Inline css update for manual 2016-11-29 18:53:03 +01:00
octachron 20f1406a64 Delete `\tq` macro 2016-11-29 18:53:03 +01:00
octachron 862e276728 caml_example: convert example linked to verbatim 2016-11-29 18:53:03 +01:00
octachron c62735066f Convert handwritten code examples to caml_example 2016-11-29 18:53:03 +01:00
octachron eae2b1337b Activate caml_example for refman/exten.etex 2016-11-28 21:02:22 +01:00
Thomas Blanc 6361a2fc57 Fixing typo in manual (7.16) 2016-11-28 15:30:30 +01:00
Gabriel Scherer dade0b507c Merge pull request #920 from sliquister/leak-in-c-binding-example
manual: example of releasing the runtime system leaks memory
2016-11-27 15:43:23 -05:00
ygrek 751ba934bb find shell in PATH, do not assume /bin/sh exists 2016-11-26 15:39:59 -08:00
alainfrisch 04d1f22ea8 Add missing documentation for OCAMLRUNPARAM=0x400 in the manual. 2016-11-18 16:22:26 +01:00
Gabriel Scherer c628d9c6e1 Merge pull request #921 from Octachron/manual_deprecated_names
Manual: deprecated modules have a name too
2016-11-16 16:27:44 -05:00
octachron b5a8bbac6e manual: deprecated modules have a name too 2016-11-16 18:55:12 +01:00
Valentin Gatien-Baron 43ead20b7b manual: example of releasing the runtime system leaks memory 2016-11-16 11:05:04 -05:00
Gabriel Scherer ef587451b3 Merge pull request #895 from Octachron/manual_caml2tex_html
Manual: alternative html structure for code examples
2016-11-09 17:16:14 -05:00
octachron 45fb5d0c47 caml_tex2: new html structure for code examples 2016-11-09 19:27:25 +01:00
Bernhard Schommer bc81c313b0 Added expand to toplevel. (#864)
* Added expand to toplevel.

The toplevel now also accepts -args and -args0. In order to avoid
problems with the overide_args hack now script file is allowed in
expand options.

* Fixed differences between .ml and .mli

* Added missing expand in opttopmain.

* Added some test for broken -args for toplevel.

The test checks whether the toplevel fails if the script file is passed
via args option.

* Corrected test case.

* Updated error case.

Instead of printing the error string, Arg.Bad is raised and a wrapper is
added around the parse_and_expand_dynamic_argv.

* Added begin ... end around try ... with.

* Added working example an strip error path.

* Use sed to remove path and fixed typo.

* Added documentation.

* Also fix typo in reference file.

* Added PR to the corresponding change entry.

* Reworked Changes entry.

* Added new tests and updated documentation.

A script file in a responsefile now only prints an error message instead
of the help.

* Removed duplicated entry.

* Simplified expand logic.

We only remember where the current last expanded option is.

* Use first non_expand position instead.

* Updated error message.
2016-11-07 11:48:56 -05:00
octachron 101a0099e0 Fix: unify more toplevel in unified-options.etex 2016-11-05 16:18:23 +01:00
octachron c0d95c3e5b Fix: default warning in unified-options.etex 2016-11-05 16:16:24 +01:00
octachron ff3cc02949 Fix: improve unified-options.etex readability 2016-11-05 16:15:29 +01:00
octachron 25dc8dcfb0 Fix: new options in unified-options.etex 2016-11-05 16:13:52 +01:00
octachron f28422b601 Manual: unify compilers/toplevel options
This commit creates a file unified-options.etex which regroups at
source level the description of the compilers and toplevel options.
Difference of options between native/bytecode compilers and toplevel
are handled via conditional tex macros.
2016-11-05 16:04:04 +01:00
Bernhard Schommer 67f4c2b663
Terminated instead of seperated. 2016-11-04 19:44:57 +01:00