summaryrefslogtreecommitdiff
path: root/toplevel
Commit message (Collapse)AuthorAgeFilesLines
* Bytesections: cleanup API (#11623)hhugo2023-03-111-22/+22
|
* toplevel: also separate the toplevel phrase with a blank lineGabriel Scherer2023-02-232-2/+13
|
* toplevel: show hints for the "undefined global" error (#10647)wiktorkuchta2023-01-231-0/+36
|
* rename wrap_def -> with_local_level, etc.Takafumi Saikawa2022-12-271-2/+2
|
* fixTakafumi Saikawa2022-12-271-20/+20
|
* Introduce wrapper functions for level management ([Ctype.wrap_def], etc)Takafumi Saikawa2022-12-271-30/+30
| | | | | | | | and for type variable scoping ([Typetexp.wrap_type_variable_scope]). The older API ([Ctype.(begin_def,end_def)], [Typetexp.(narrow,widen)], etc.) is now removed. The scope of some level management is refined (in particular for [type_application]).
* Merge pull request #11534 from gasche/follow-synonyms-in-show-module-typeFlorian Angeletti2022-12-021-10/+32
| | | | | | Follow synonyms in #show_module _type (cherry picked from commit 85a081792117f2f4a312aee3484e84fed8dd5b8a)
* topdirs.ml: (install,remove)_printer, test error casesGabriel Scherer2022-11-261-1/+1
|
* topdirs.ml: avoid exceptions completely in #(remove,install)_printerGabriel Scherer2022-11-261-38/+52
| | | | Suggested-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
* topdirs.ml: rewrite the printer-matching logic to avoid exceptionsGabriel Scherer2022-11-261-59/+66
| | | | Suggested-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
* topdirs.ml: Generic printers only need an arityGabriel Scherer2022-11-261-9/+10
|
* [minor] topdirs.ml: bound the scope of find_printer exception handlingGabriel Scherer2022-11-261-6/+6
|
* topdirs.ml: cleaner representation of different kinds of printersGabriel Scherer2022-11-261-31/+48
|
* topdirs.ml; generic printers are never old-styleGabriel Scherer2022-11-261-9/+6
|
* Define printer types manually rather than parsing them from stringsSébastien Hinderer2022-11-243-36/+34
|
* Embed printer types in toplevels and debuggerSébastien Hinderer2022-11-249-48/+71
| | | | | | | | | | | | | | | | | | | The debugger and toplevels let users install printers for their data types. To make sure the provided printers have the right type, both the debugger and the toplevel need to know the internal OCaml representation of the expected types. So far, both the debugger and the toplevels used to extract the expected representatioons from topdirs.cmi which they were reading at runtime. This creates problems (e.g. when the compiler has not yet been installed) and yields not so easy to read code. In this commit, the type of the printers are defined in strings as they would be written in OCaml in topdirs.ml. These strings are parsed at runtime and the corresponding typing declarations are added to the environment.
* Encode extra types within pathHyunggyu Jang2022-11-111-3/+3
| | | | | | | | Reflect reviews Reflect review Pacify hygine
* Add explicit constructors to Path.t for inline record typesLeo White2022-11-111-0/+4
|
* Remove hash type encodingHyunggyu Jang2022-11-091-6/+2
|
* Add a toplevel directive to switch off debugging (#9290)Jacques Garrigue2022-07-191-0/+7
|
* Merge pull request #11382 from Octachron/topdir_fixGabriel Scherer2022-07-062-2/+0
|\ | | | | compilerlibs: avoid unnecessary read to +compiler-libs/topdirs.cmi
| * toplevel: don't read Topdirs cmi during pre-initialisationFlorian Angeletti2022-07-012-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The Toploop module perform some pre-initialisation as soon as the module is linked. This pre-initialisation only affects modules linked by ocamlmktop when building custom toplevels. Indeed user-provided module are linked by ocamlmktop before the toplevel is initialised and started. This commit removes the read of topdirs.cmi from this preinitialisation stage. This may broke ocamlmktop users that install printers, but this is required to be able to write client of the toplevel compiler library that don't read +compiler-libs/topdirs.cmi. In particular, the expect_test tool from the compiler testsuite belongs to this category.
* | Provide an interface for toplevel/topstart.mlSébastien Hinderer2022-06-301-0/+19
| |
* | Add an interface to expunge's entry pointSébastien Hinderer2022-06-301-0/+19
|/
* Merge pull request #11298 from dra27/toplevel-set_pathsFlorian Angeletti2022-06-093-4/+4
|\ | | | | Add ?auto_include to Toploop.set_paths
| * Add ?auto_include to Toploop.set_pathsDavid Allsopp2022-06-073-4/+4
| | | | | | | | | | Provides an easier way for alternate toplevels to disable the automatic inclusion mechanism.
* | Have ocamlnat display the warning tooDavid Allsopp2022-06-072-1/+6
| |
* | Deprecate implicit basenames with no extensionDavid Allsopp2022-06-073-0/+15
|/ | | | | | | | | In order to free up the ocaml command to be able to be used for other things, require that a script argument to ocaml (i.e. an anonymous argument) is either a path (e.g. ./script) or has an extension (e.g. ocaml script.ml). This only applies to the first argument.
* Display an alert if -I +unix, etc is missingDavid Allsopp2022-05-241-1/+1
|
* Always load topdirs.cmi from compiler-libsDavid Allsopp2022-05-051-5/+4
|
* Fallback to +compiler-libs/topdirs.cmi in toplevelDavid Allsopp2022-05-057-2/+18
| | | | | If Topdirs is not found in the search path, attempt to load topdirs.cmi directly from +compiler-libs before aborting.
* Install topdirs.cmi to a separate directoryDavid Allsopp2022-05-051-1/+2
|
* Factor out reading OCAMLTOP_INCLUDE_PATHDavid Allsopp2022-03-014-16/+14
|
* Remove uses of ;; from the codebaseSébastien Hinderer2022-02-251-1/+1
|
* Release bytecode only after backtrace has been recorded (#10803)Renato Alencar2022-01-313-15/+23
| | | | | | | | | When an exception happens bytecode has been released before the backtrace is recorded and so all the debugging information related, because of that the backtrace information for the script that has just been compiled was not being found, which resulted on showing 'unknown location' instead of the actual location. Enable debug flag for running a file on toplevel
* Merge pull request #10839 from Et7f3/fix_show_regressionFlorian Angeletti2022-01-271-4/+18
| | | | | | fix #show regression in 4.14 (cherry picked from commit ae1a31b01922642389758e313777feaab9de93a0)
* Printexc.catch, Printf.kprintf, Unix.SO_ERROR: add deprecation warning (#10924)Nicolás Ojeda Bär2022-01-211-1/+1
|
* Remove `Stream`, `Genlex`, `Pervasives` & the legacy `bigarray` library (#10896)Nicolás Ojeda Bär2022-01-201-3/+0
|
* Merge pull request #10825 from gasche/shape-strong-call-by-needFlorian Angeletti2022-01-202-2/+4
| | | | | Shapes: a strong-call-by-need evaluator (cherry picked from commit 7705e920648cb9ee4879e832da942fae45230f6d)
* Merge pull request #10831 from ocaml-multicore/multicore-prXavier Leroy2022-01-101-1/+1
|\ | | | | Multicore OCaml integration.
| * Merge commit '17561dc1cf9127e53485721d0f16f73aa436680e' into 5.00_rebase_to_prTom Kelly2021-12-202-2/+8
| |\
| * \ Merge commit '2bcef4bc172f476217f253d24cb3311eaca504bf' into 5.00_rebase_to_prTom Kelly2021-12-203-87/+159
| |\ \
| * \ \ Merge commit '2250fd8a2218796c07b0a25f184cdc682e4695ba' into 5.00_rebase_to_prTom Kelly2021-12-202-2/+2
| |\ \ \
| * \ \ \ Merge commit '7fb10211f65d0d558d7b0c69e5ea427621f25e09' into 5.00_rebase_to_prTom Kelly2021-12-201-1/+1
| |\ \ \ \
| * | | | | fix for Pfield usage in native/topevalTom Kelly2021-12-201-1/+1
| | | | | |
* | | | | | Fix more display differences between ocamlnat/ocaml (#10849)David Allsopp2022-01-054-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unites the toplevels still further. Previously, the native toplevel did not display output for: let _ : <type> = <expr> and related cases. The `match` for wildcard bindings is now shared between bytecode and native, so the native toplevel should always display values when the bytecode would.
* | | | | | Add comments explaining native code differencesDavid Allsopp2022-01-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explains both why ocamlnat needs to name certain expressions and also why this is now done after typing rather than before.
* | | | | | Fix type variable naming in native toplevelNathan Rebours2022-01-041-15/+53
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was written by @lpw25 . It makes the native toplevel preserve type variable names in the same way as the bytecode toplevel. This patch was originally submitted to flambda-backend Signed-off-by: Nathan Rebours <nathan.p.rebours@gmail.com>
* | | | | Shapes: Add -dshape flag for debugging and testing purposesUlysse Gérard2021-11-092-2/+4
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Thomas Refis <thomas.refis@gmail.com>
* | | | | Shapes: Compute shapes during type checkingUlysse Gérard2021-11-092-2/+6
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | /!\ Needs bootstrap Co-authored-by: Thomas Refis <thomas.refis@gmail.com>