| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
which is used by both ocamldoc and the reference manual.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
1.
PR#7698
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit removes a dangling reference to the explicitly overriding
method definition that was moved to the tutorial part of the manual.
|
| |
|
|
| |
Add C stubs Unicode guidelines to manual
|
| |
|
|
| |
Discuss FMA and also the issue from MPR#7271.
|
| |\
| |
| | |
Add -linscan doc to manual
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
-(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).
|
| | |
| |
| |
| | |
The alternative separator must be in ":|; ,".
|
| | |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
aka `x.Module.Path.!(y)` and friends
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |/
|
|
| |
* Turn off warning 40 by default
|
| |\
| |
| | |
Fixing the limitations on destructive substitutions
|
| | | |
|
| |\ \
| | |
| | | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/
|/| |
|
| | |
| |
| |
| | |
As noted by @Octachron
|
| | |
| |
| |
| | |
No change entry needed
|
| | | |
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Support 'let open' in class and class type expressions.
* Adapt ocamlprof.
* Adapt ocamldoc.
* Add tests.
* Changelog.
* Manual.
|
| | |\ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 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
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This manual clarification is intended to lift up the misunderstanding
that is the basis for #1066.
|