- Ident.create now takes a scope as argument
- added Ident.create_var to use when the scope doesn't matter
- the current_time and the current_level are unrelated as of this
commit. But one has to remember to bump the level when creating new
scopes.
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.
- remove special case for Stdlib.Pervasives in printtyp.ml
- store what was passed on the command line, before expanding
+foo into path-to-stdlib/foo, instead of randomly doing either
- the toplevel libraries were not expanding the leading + from
OCAMLPARAM
- make the native toplevel slightly closer to the bytecode one
- remove what looks like duplicated code in ocamldoc
The bytecode runtime now represents code to be loaded as LongString.t,
rather than as a naked pointer to a bytecode block.
(This commit breaks Dynlink of bytecode, due to an issue about digests)
These options allow to control whether identifiers are made unique by
appending a stamp to them when dumping intermediate representations or not.
The default is to print the stamp, as is done currently.
The "-dno-unique-ids" option is useful e.g. to simplify the comparison
between a produced intermediate reprsentation (-dlambda, say) and the
expected one, in the context of the testsuite, for instance.
The toplevel output for #help seems to be sorted and looks like:
#show <ident>
Print the signatures of components from any of the above categories.
#show_class <ident>
Print the signature of the corresponding class.
#show_class_type <ident>
[...]
Thus the documentation for #show needs to say that the categories are
below, not above. The code is effectful and has the specific #show_*
directives before the general #show one. That's why I expect there is
some kind of sorting done at runtime.
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.
The code (which was originally written against 3.12) was ported to trunk by
doing
```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```
and then applying the diff by hand.
* 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.
Passing the original lambda might lead to illegal remnants of Lifused in the code passed to closure.ml (which will in turn raise an assertion error). This costed me a whole afternoon, I really wish there was a supported, native (or better: agnostic) toplevel.
Before this patch,
module A = struct let x = 1 end;;
module B = struct module M = A end;;
module C = B.M;;
module D = C;;
#show D;;
would print
module D = C
now it prints
module D = C
module D = B.M
module D = A
module D : sig val x : int end
Note that one might expect to read
module D = C
module C = ...
instead, but this would result in the next line being
module B.M = ...
which is not syntactically correct.
Note that this approach could be generalized to other forms of
aliases-following, types in particular.
.. and allow any letter in [g-zG-Z] as modifier (previously 'l','L','n')
Also allow modifier for floats
This give more freedom to ppx rewritters (what about a ppx for zarith)
Checks are performed when translating from Parsetree to Typedtree.
Invalid_literal is raised if the modifier is not recognized ([lLn]?)
Integer_overflow is raised as before.
Lexer: use g-zG-Z for integer literal modifier
Lexer: Allow modifier on float
Clean wrt previous commits
Lexer: use named substring
Cleanup
typo
doc
fix after rebase
rebase on trunk
Update typecore.ml
Fix printast.ml