Commit Graph

489 Commits (master)

Author SHA1 Message Date
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
alainfrisch c8d90398e6 Support -verbose in ocamlnat. 2016-07-20 16:37:52 +02:00
Fabrice Le Fessant d1418bc031 Remove dependency on Dynlink in ocamlnat 2016-07-18 17:49:52 +02:00
Fabrice Le Fessant f26c0ff8b6 Add plugins in the compiler 2016-07-18 17:43:05 +02:00
Fabrice Le Fessant bfc36003aa Add hooks on some compilation phases 2016-07-12 17:59:58 +02:00
Alain Frisch 2865a8c088 Merge pull request #591 from mlasson/ocamlparam
A few modifications to OCAMLPARAM
2016-07-10 14:44:37 +02:00
Pierre Chambart 1624c8e7a0 Also remove the forced dependency dummy code hack for closure
This also share the result type of transl_implementation_flambda
and transl_store_implementation
2016-07-08 16:02:26 +02:00
Pierre Chambart cb388c762a Some cleanup to explicit transl_implementation_flambda return values 2016-07-08 16:02:26 +02:00
Pierre Chambart 7286a4978f Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
Mark Shinwell 5f00ce793e Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
Marc Lasson 465ee34d67 Reads OCAMLPARAM's I directive in toplevel 2016-07-04 09:53:31 +02:00
Marc Lasson 0fd2964dff Use OCAMLPARAM's objects in toplevel
Only the non-native one (it does not support OCAMLPARAM at all atm).
2016-07-04 09:53:23 +02:00
Gabriel Scherer 29b9b271e4 MPR#7189: toplevel #show, follow chains of module aliases
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.
2016-06-30 06:51:33 -04:00
Jacques Garrigue 3cb6d6c702 PR#7233: GADT equations for non-local abstract types 2016-06-13 09:25:31 +09:00
Damien Doligez 4a2107be8d Merge pull request #575 from shindere/toplever-no-version
Add the -no-version option to the toplevel.
2016-05-10 11:31:26 +02:00
Sébastien Hinderer 3bbf34319e Add the -no-version option to the toplevel.
This option requests the toplevel not to print its version number
at startup.
2016-05-09 17:22:29 +02:00
Sébastien Hinderer 50147913ac Call the '#' sign hash rather than sharp. 2016-05-09 16:34:40 +02:00
Demi Obenour fe05f8fc29 Add `-alias-deps` and `-app-funct`
This was meant for GPR #514, but I forgot to include it.
2016-04-19 12:21:09 -04:00
Demi Obenour 795a4d532d Add explicit command-line flags for currently-default settings
-no-keep-docs
    -no-keep-locs
    -no-principal
    -no-rectypes
    -no-strict-formats
2016-04-18 10:53:51 -04:00
alainfrisch 83ae23568c Renaming block_kind -> value_kind. 2016-04-12 14:49:50 +02:00
alainfrisch 932d806937 Fix for ocamlnat. 2016-04-12 14:49:48 +02:00
alainfrisch 502e4f9336 More warnings when compiling the compiler. 2016-03-15 22:46:35 +01:00
Jeremie Dimino 86daba0e90 Add Toploop.override_sys_argv 2016-03-01 10:36:24 +00:00
Jeremie Dimino b98461c3f3 Add Misc.protect_refs 2016-03-01 10:36:24 +00:00
Mark Shinwell 5dced42768 Merge pull request #480 from mshinwell/flambda_unbox-closures
GPR#480: Flambda fix: try to make Unbox_closures behave more reasonably
2016-02-26 16:18:04 +00:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
Damien Doligez 21dce60dbd Merge pull request #467 from Octachron/manual_4.03.0_end
Manual: #help directive and immediate attribute
2016-02-12 11:16:08 +01:00
Leo White 4253ed1530 Tidy up new command-line parameters 2016-02-11 16:02:02 +00:00
octachron 213f51a77b Manual: synchronize the manual and toplevel help 2016-02-11 16:56:16 +01:00
Mark Shinwell 04445cb4ad Fix ocamlnat build (again) 2016-02-11 14:49:57 +00:00
Mark Shinwell c67bd88eee Addressing CR comments for Flambda 2016-02-10 17:01:33 +01:00
Mark Shinwell f95fb8bbb0 Bug fixes etc for Flambda 2016-02-09 18:38:16 +01:00
Mark Shinwell 7255775076 Fix ocamlnat build 2016-02-09 10:18:58 +01:00
Mark Shinwell a397511031 Import latest Flambda changes 2016-02-09 09:59:26 +01:00
Gabriel Scherer 8cbccbffe4 remove ocamlbuild-specific files 2016-02-01 15:05:18 -05:00
Gabriel Scherer f8f2a6277f remove ocamlbuild from the compiler distribution 2016-02-01 15:05:18 -05:00
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +01:00
Thomas Refis 6c29c225eb ocamlnat: fix compilation 2015-12-31 11:20:58 +00:00
Gabriel Scherer 6c91699c6f 'Hint: Did you mean' on misspelled toplevel directives 2015-12-25 20:58:51 +01:00
Gabriel Scherer d7dfe9604e toplevel #help: split the directives into several sections 2015-12-25 19:53:27 +01:00
Gabriel Scherer 43c31e4f08 Add #help directive to the toplevel.
Nick Giannarakis proposed a first patch at
  http://caml.inria.fr/mantis/view.php?id=6113

Berke Durak and Francis Southern proposed two iterations on the patch
at:
  https://github.com/ocaml/ocaml/pull/46
  https://github.com/ocaml/ocaml/pull/376

The present patch contains code and ideas from all three sources.
2015-12-25 19:53:27 +01:00
Mark Shinwell 852efd270e Merge with trunk; remake dependencies 2015-12-22 16:28:35 +00:00
alainfrisch f6b5c9d579 Fix #7101: double file opening when loading .cmo/.cma in the toplevel leads to fd leak. 2015-12-18 15:54:48 +01:00
Pierre Chambart 233e1b1791 Record compiler runtime 2015-12-18 13:33:10 +00:00
Thomas Refis 3a79584852 reindent 2015-12-18 10:39:36 +00:00
Jeremie Dimino d0e62811c0 make ocamlnat build again
Conflicts:
	Changes
	Makefile.shared
2015-12-18 10:39:36 +00:00
Xavier Leroy 8e6606d729 PR#6108, PR#6802: fail cleanly if dynlink.cma or ocamltoplevel.cma are loaded inside the toplevel loop 2015-12-06 12:59:23 +01:00
Damien Doligez cce9cb4546 fix `ocaml -stdin` (was broken by 0296d022) 2015-12-04 16:20:55 +01:00
Hugo Heuzard 9eca3e4519 Parse arbitrary precision integers ..
.. 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
2015-12-03 17:20:48 +01:00
alainfrisch 837bcd6e7b PR#6396: Warnings-as-errors not properly flushed in the toplevel. 2015-12-03 14:31:46 +01:00
alainfrisch 9879d54989 #6865: restore previous behavior for 'let _ = expr' in the toplevel, i.e. it prints the result of 'expr'. 2015-12-03 09:26:36 +01:00
alainfrisch a79825f7a6 #6401: use proper error reporting for toplevel's environment initialization (original patch from Gabriel Scherer). 2015-12-02 16:59:30 +01:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Damien Doligez 1326b12f74 merge branch 4.02 from rev 16205 to rev 16238
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-29 22:19:24 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Gabriel Scherer 304c9c91a5 PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
(Peter Zotov and Jake Donham,
 review by Gabriel Scherer and Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15830 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:12 +00:00
Jacques Garrigue df4916451b Fix PR#6763
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15798 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-30 02:02:28 +00:00
Damien Doligez 0296d022e1 PR#6081: ocaml should add script's directory to search path, not current directory
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 22:45:06 +00:00
Damien Doligez 37046542fb fix typo (see PR#6704)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-08 22:57:34 +00:00
Jacques Garrigue 158480371a exhauce PR#6367: introduce Asttypes.arg_label to encode labelled arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 08:45:55 +00:00
Gabriel Scherer f15f4f3ed8 PR6695: Make sure the compiler only uses ASCII string functions.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Gabriel Scherer 0338871043 rewrite cycle-detection in genprintval.ml to use O instead of Obj
(see previous commit)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 15:33:48 +00:00
Gabriel Scherer ecb299dfa7 rewrite the printing of Lazy values in toplevel/genprintval.ml
The code previously used Lazy.is_val to know whether the value was
already-evaluated (and, in this case, Lazy.force to extract this value
and print it more precisely). But it lies inside a functor that is
instantiated over different implementations of Obj, while
Lazy.{is_val,force} force the use of the Obj module of the standard
library. This could cause segfaults when this code is called from the
debugger, which instantiates it with a different Obj module talking
over a socket.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15656 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 15:33:46 +00:00
Damien Doligez 9c53766241 apply GPR123: fix stupid bug in opttoploop
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15649 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-12 17:12:08 +00:00
Gabriel Scherer f0cee36d3a toplevel: be explicit about what path are used for
From: Pierre Chambart <pierre.chambart@ocamlpro.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15635 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-06 17:11:11 +00:00
Gabriel Scherer 5f58cc7d3f toplevel: generic printers are only allowed with 'new' printer style.
From: Pierre Chambart <pierre.chambart@ocamlpro.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15634 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-06 17:11:09 +00:00
Gabriel Scherer bdaf4c3cf5 toplevel: extends #install_printer to accept parameterised printers
From: Pierre Chambart <pierre.chambart@ocamlpro.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15633 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-06 17:11:07 +00:00
Gabriel Scherer 9d01c60c3a toplevel: allows the extension of 'genprintval.ml' with parameterised printer.
From: Pierre Chambart <pierre.chambart@ocamlpro.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15632 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-06 17:11:04 +00:00
Gabriel Scherer e98ee03205 fix regression in toplevel printing of lazy values
(fix from Leo White)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15602 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-23 09:17:59 +00:00
Jacques Garrigue 5adbb67a45 PR#6648: show_module should indicate its elision (add Osig_ellipsis to outcometree)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15573 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-10 09:09:23 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch e3ad818fb5 Reintegrate-merge constructors_with_record5 branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-14 15:51:30 +00:00
Alain Frisch 56782ae7bc #6609: export Toploop.phrase.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15528 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-13 07:17:10 +00:00
Alain Frisch 37f4743986 Factorize.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15459 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:59:37 +00:00
Alain Frisch 2a6db79e0e Prepare environment (with Compenv.readenv) before executing script passed on the toplevel command-line.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15412 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 14:50:36 +00:00
Alain Frisch 4c3cd9fb7b Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15334 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-25 15:49:42 +00:00
Alain Frisch 44c2066055 #5904: improve support for ppx in the toplevel by allowing ppx processors to keep information across calls (through the use of persistent cookies). Also change Ast_mapper.register so that the function that creates the mapper from arguments is executed once the context has been restored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 14:54:01 +00:00
Alain Frisch 378a967cb7 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-04 16:11:12 +00:00
Alain Frisch adcd0fe5c9 #6529: further optimize consistency check.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15171 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-01 08:36:47 +00:00
Damien Doligez a18bc7950b merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 17:14:00 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Alain Frisch 50f47df33a Sync with trunk. Rebinding of inlined extension constructors with free variables is not yet supported.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 16:07:55 +00:00
Alain Frisch 047e09748c Cherry-pick 15062,15063,15064 from 4.02 (#6497).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:46:34 +00:00
Xavier Leroy bb83542732 Reflecting commit 14976 on version/4.02:
PR#6211: in toplevel interactive use, bad interaction between uncaught
exceptions and multiple bindings of the form "let x = a let y = b;;".


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 15:14:41 +00:00
Mark Shinwell 60d0af57c4 merge from 4.02: rev. 14858, Adding #ppx toplevel directive (patch by Peter Zotov, github #54).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-30 12:10:06 +00:00
Jacques Garrigue 77cf8b999e * split Typetexp.lookup_module and Typetexp.find_module
* fix semantics of -open by using Typemod.type_open_


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14795 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:02:26 +00:00
Jacques Garrigue ccce272966 commit o_and_opens.diff
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 00:17:05 +00:00
Mark Shinwell a9cc0281e5 cycle detection in the toplevel printer (Leo White, https://github.com/ocaml/ocaml/pull/23/)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14766 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-08 08:31:45 +00:00
Jacques Garrigue 1ce29d9bfc re-commit Leo's weak-dependencies pull request
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 00:34:20 +00:00
Jacques Garrigue fc24112e25 change -trans-mod to -no-alias-deps, and update message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 02:05:30 +00:00
Jacques Garrigue b56dc4b3df PR#5584: merge open extensible types, extension-patch-4.0.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 23:08:45 +00:00
Jacques Garrigue 95104b3924 revert commit 14719
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14723 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 06:19:55 +00:00
Mark Shinwell 521ac0213a weak dependencies with -trans-mod (github/ocamllabs/weak-depends 45e980a,21856a7,merge)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 12:50:20 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Alain Frisch d2de0d7b18 Revert 14616, 14617. Go back to the original syntax for toplevel directives, only allowing capitalized identifiers in addition to lowercase ones. Split #show into variants #show_val, #show_type, etc, and implement a generic #show which combines all the results.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14697 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 08:04:43 +00:00
Alain Frisch 3775a101e6 Avoid bad error report when a registered toplevel primitive raises Not_found.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14671 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 16:18:22 +00:00
Alain Frisch eb617b5fe7 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:33:41 +00:00
Alain Frisch ec52baed6f #5377: add a #show directive to the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14618 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:24:14 +00:00
Alain Frisch 26a8bc20a7 Support for toplevel primitives with multiple arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14616 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 16:51:37 +00:00
Alain Frisch ca1e303b56 Keep the id for the synthesized sub-declaration in Cstr_record.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14560 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08 13:24:24 +00:00
Alain Frisch 1d4e1364bd Keep inlined records in Typedtree and Types. Synthesize record types when inserting in the environment and module components, as for labels and constructors. Following features are not supported: inline record for exceptions, GADTs, polymorphic fields.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 14:53:30 +00:00
Alain Frisch d416414ccd Adapt printer.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14548 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 12:42:49 +00:00
Alain Frisch d75e2c8b01 Support for record arguments on exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14515 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 11:46:00 +00:00
Alain Frisch ce4c5fad1d Rvert parts of the original commit which are not relevant with the encoding approach.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14513 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 16:17:37 +00:00
Alain Frisch 4607a0f8e1 Encode record arguments into extra record declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 12:20:22 +00:00
Alain Frisch 132ff51559 Some preparation for record arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28 17:08:53 +00:00
Jacques Garrigue 3b4d7cf63b Merge module-alias branch (cf. PR#6063)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-10 07:53:33 +00:00
Jacques Garrigue d90b126bd4 Add -trans-mod option for transparent module dependencies.
Without that option, dependencies are strict, both for
typing and linking.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-20 06:55:26 +00:00
Alain Frisch 0f6f367ad4 Change the representation of exception slots: instead of being represented as 'string ref', they are now blocks
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values.  Special case for predefined exceptions, represented with a negative id.

The unique id generator is moved from camlinternalOO to the C runtime system.

Also fix some bugs.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 14:28:31 +00:00
Alain Frisch d802a51be6 #6203: change representation of exception values created with a constant constructor: the value is now equal to the exception slot. This avoids some allocation when the constructor is called and an extra indirection on matching against the constructor.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 13:00:58 +00:00
Jacques Garrigue 7a904bb8db make path normalization safer; now Core not only compiles but works
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-04 02:06:40 +00:00
Alain Frisch cc31694f7c Keep attributes on module declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 17:05:39 +00:00
Alain Frisch 645dcf25e5 Keep location and attributes in type, label and constructor declarations. Deprecated warning when a deprecated type or constructor is referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14191 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 10:54:55 +00:00
Alain Frisch b92a3ca792 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 15:50:47 +00:00
Alain Frisch 884ca00fdf Continue cleanup. driver/errors.ml is no longer needed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14120 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:45:03 +00:00
Damien Doligez 7844495624 Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
  svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:12:37 +00:00
Alain Frisch 842f6794a9 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@14042 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-28 17:10:04 +00:00
Gabriel Scherer b1c5fa3e52 PR#6071: Add a -noinit option to the toplevel [patch by David Sheets]
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-04 19:58:09 +00:00
Alain Frisch b0d5fc28a2 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-22 17:03:39 +00:00
Fabrice Le Fessant 1823936ce0 Fix OCAMLPARAM problems
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-17 12:35:26 +00:00
Alain Frisch 525ef9d703 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-16 13:34:30 +00:00
Fabrice Le Fessant aa53c7c59d Fix ocamlnat compilation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-12 13:33:43 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Jacques Garrigue f35c7d123f Take ambiguity into account when using -short-paths option.
Namely, do not use an abbreviated form which doesn't correspond
directly to a physical definition when it might point to
several definitions, due to multiple opens.
Also be careful about not abbreviating types we are defining
in type definitions.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13635 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-30 09:05:26 +00:00
Alain Frisch 04de43bee5 Attributes on Pstr_eval.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 14:07:32 +00:00
Alain Frisch b0987fd693 Attributes on expresions (etc) are now stored in the expression record, to facilitate pattern matching on structured fragments of AST while ignoring attributes. Introducing a new Ast_helper module to help creating AST fragments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-08 14:59:45 +00:00
Alain Frisch d32b19008a Parse recursive module as standard modules, and check in the type-checker that an explicit type is provided. (Unfinished.)
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13353 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-05 16:50:05 +00:00
Jacques Garrigue 26e1ff7138 Merge short-paths into a fresh branch of trunk.
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-29 14:21:12 +00:00
Alain Frisch ef9fc7ab0f #5904: support for -ppx in the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-25 09:12:31 +00:00
Alain Frisch f1d0e5afab Add a -dtypedtree flag to all tools (using Printtyped). Also fix ocamlnat.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-18 17:19:53 +00:00
Wojciech Meyer bda692b6da PR#5825: Add a primitive to use source file wrapped in the coresponding module.
Patch by Grégoire Henry!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13097 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-18 16:16:50 +00:00
Alain Frisch 0b37b27356 Stop keeping a Path.t to refer to labels and constructors in the Typedtree AST. This is not used internally and it is not a robust way to identify these objects unambiguously anyway
(especially when we will add more powerful disambiguation strategies).  The correct way to identify an item is through the pair (type,name), which can be deduced from the
label_description/constructor_description stored in the Typedtree.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 12:03:00 +00:00
Alain Frisch dfa500533a #5741: make Pprintast available from the command-line (-dsource).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13025 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 16:09:38 +00:00
Damien Doligez 59371b9d75 remove TABs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13014 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 18:01:26 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Alain Frisch 08c3b1780a PR#5787: Bad behavior of 'Unused ...' warnings in the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13010 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-12 08:24:34 +00:00
Jacques Garrigue 35185d610b merge version/4.00 at revision 12866
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-21 07:10:35 +00:00
Jacques Garrigue d165ca651e PR#5722: toplevel: print full module path only for first record field
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12861 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-14 05:23:40 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Damien Doligez 1330131d70 PR#5677: do not use "value" as identifier (genprintval.ml)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12690 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 15:03:11 +00:00
Gabriel Scherer b667a00686 PR#5628: Add Topdirs.remove_directory (and directive #remove_directory) to remove a directory from the load path
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-07 11:40:33 +00:00
Alain Frisch 5b19f3e5be Unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12546 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-01 14:42:56 +00:00
Alain Frisch 76c4f6d0b8 #5629: A toplevel 'open' in the REPL does not trigger an unused open warning.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12541 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-01 14:05:49 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Jacques Garrigue a23314e0b8 Catch Not_found when calling Env.find_type + call Includemod.signatures in Toploop
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12439 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-08 04:26:13 +00:00
Jacques Garrigue 41f177742e disable unused warnings for identifiers defined in the toplevel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-25 07:51:29 +00:00
Jacques Garrigue de7262e181 prefer newest name + only update env after printing
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12380 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-19 06:23:14 +00:00