Commit Graph

1708 Commits (166ba7147983c961f5cb220fe3222b59d68c75e2)

Author SHA1 Message Date
Alain Frisch 6f2bb2922c Fix #6748 (bug in tast_iter, some module coercions were not rewritten).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15773 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-15 11:59:18 +00:00
Alain Frisch 6e85c2d956 #6737: also keep attribute with optional argument + default value.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-06 11:16:23 +00:00
Alain Frisch 8a2030cff1 #6737: fix typedtree attributes on (fun x -> body) expressions).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-06 11:02:17 +00:00
Gabriel Scherer 055d5ff07f PR#6714: allow [@@ocaml.warning] on most structure and signature items (values, modules, module types)
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15752 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 08:44:50 +00:00
Alain Frisch 9d450a05e0 Replace TypedtreeMap with a more standard open-recursion iterator Tast_mapper. Keep TypedtreeMap/Iter for now, for external projects.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15739 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:36:41 +00:00
Jacques Garrigue 93bae0cc3a Exhauce PR#6611: remove the option wrapper on optional arguments in the syntax tree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:06:02 +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 4c5c124785 PR#6466: use "extensible variant" rather than "open" types in error message
(Leo White)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15715 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 08:26:18 +00:00
Gabriel Scherer 1e411a376b Fix constructor names in Typedast printing.
From: Drup <drupyog@zoho.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 17:31:38 +00:00
Jacques Garrigue 583395b0c6 Fix PR#6726: Access to the wrong field of aliased module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15681 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 07:20:00 +00:00
Jacques Garrigue ac6c857df4 add comment for Tobject in Datarepr.free_vars
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15676 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-16 01:48:09 +00:00
Jacques Garrigue fd2e5d7a52 Fix PR#6716: Assertion failure with existentials + inline records + rows
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-16 01:37:44 +00:00
Gabriel Scherer f33c14b278 'Did you mean' for instance variables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:29 +00:00
Gabriel Scherer bbf039706a 'Did you mean' for unbound method names
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:27 +00:00
Gabriel Scherer 7a97cb4f72 typecore.ml: minor refactoring
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:25 +00:00
Gabriel Scherer b6c2247a45 simplify spellchecking of labels in typecore.ml:
By computing the list of valid names at Wrong_name raising point, we
can remove the logic to reconstruct the set of valid names to draw
suggestion from after the fact:
- no spellchecking-related code in the NameChoice functor
- seamlessly extends to fields of inline records (were not spellchecked before)

I made the type of the "wrong name" in the Wrong_name exception more
precise, from Longident.t to string. The rationale is that:
- we only raise this exception when the longident happens to be
  a (Lident str)
- the list of valid names is a list of field or variant names; those
  are strings rather than idents

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15652 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:24 +00:00
Gabriel Scherer 3e7c17695c 'Did you mean' for variables missing on one side of an or-pattern
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:22 +00:00
Gabriel Scherer 843f152505 simplify the spellcheck functions
- expose the core spellchecking functionality in Misc rather than Typetexp
- remove the too high-order (yet insufficiently parametric)
  Typetexp.spellcheck from the public interface
- rewrite the spellchecking functions for variants and fields in
  Typecore from the Misc functions rather than reusing
  Typetexp.spellcheck

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:16 +00:00
Alain Frisch a033839139 #6688: allow val declarations as structure items.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-10 13:37:50 +00:00
Jacques Garrigue 7a52c110b4 Fix PR#6680
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15640 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-08 08:10:55 +00:00
Jacques Garrigue 1453740778 fix PR#6690
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-08 07:51:10 +00:00
Alain Frisch 77bc51fb82 Avoid an index-out-of-bound fatal error when the primitive name is empty.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-03 09:40:27 +00:00
Gabriel Scherer 7bacc5beb4 Typedtree: add type information to primitive coercions
This will enable type-directed optimizations during translation of
module coercions.

WARNING: this breaks Typedtree representation, magic number will have to
be adjusted.

From: Frederic Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 11:55:24 +00:00
Jacques Garrigue dcb6a4dd7e tentative fix of PR#6651
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15576 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-12 11:59:23 +00:00
Jacques Garrigue 18ed39fb36 Fix PR#6650: Cty_constr not handled correctly by Subst
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15574 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-10 09:43:30 +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 94dfb61c09 fix a bug where the .annot files were truncated because of a missing "close"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15565 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-29 21:18:14 +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 af330ed939 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:49:39 +00:00
Alain Frisch fbc0356199 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15506 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:40:06 +00:00
Alain Frisch 50e0458bc9 Fix.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:32:47 +00:00
Alain Frisch 1abf8e25be Better error message.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15504 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:30:32 +00:00
Alain Frisch 2a4e45404e Text.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15503 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:28:56 +00:00
Alain Frisch bf7fc7ddd3 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:15:18 +00:00
Alain Frisch f66fe1d196 Move constructor and label description records to the bottom of Types. Conceptually those records don't belong to the type language, and could very well be declared e.g. in Datarepr instead.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 12:09:34 +00:00
Alain Frisch 5d66f846ca Improve error message.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 16:08:06 +00:00
Alain Frisch 0f70276225 Reduce diff with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15493 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 15:56:39 +00:00
Alain Frisch c69e6d10d2 Reduce diff with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15492 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 15:56:20 +00:00
Alain Frisch 7d53335538 Stop propagating manifest on inlined record types created by rebinding of extension constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 13:57:19 +00:00
Alain Frisch 44e21907a0 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15489 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 10:36:14 +00:00
Alain Frisch f87ab66c09 Simplify removal of duplicated values in signatures, reusing the same code as for structures (instead of duplicating the logic; also getting rid of a quadratic algorithm).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15488 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 10:31:15 +00:00
Alain Frisch e1eddd80ed Disallow completely inline records on GADT constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-07 07:36:21 +00:00
Alain Frisch ad32b4dcee Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15460 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:59:45 +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 d8c418d1cc Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15457 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:32:08 +00:00
Alain Frisch 808d3de148 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15456 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:30:39 +00:00
Alain Frisch 0b2745ed8c Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:26:58 +00:00
Alain Frisch 02bfe9c1ec Factorize.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15453 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:24:50 +00:00
Alain Frisch 3fbf73839d Sync with trunk + cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15452 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:17:45 +00:00
Alain Frisch 7ba65eb8eb Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 15:16:45 +00:00
Alain Frisch 7a21fae1a7 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15445 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:26:11 +00:00
Alain Frisch 9739923fca Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:19:59 +00:00
Alain Frisch 5d0a491e56 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:14:17 +00:00
Alain Frisch f7506d81df Factorize.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15441 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:13:36 +00:00
Alain Frisch 79e0a4e3e6 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15440 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:04:10 +00:00
Alain Frisch cb01d1c89f Cleanup detection of duplicated type/... names.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15439 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 12:03:05 +00:00
Alain Frisch 399faa65e9 Reduce diff.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:57:43 +00:00
Alain Frisch bafd443248 Reduce diff.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:51:53 +00:00
Alain Frisch 997ba44234 Reduce diff.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15436 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:49:22 +00:00
Alain Frisch 3ad9891e54 Reduce diff.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15435 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:48:44 +00:00
Alain Frisch f56b5bcf1b Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15434 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:46:21 +00:00
Alain Frisch 64d170354c Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15433 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:45:23 +00:00
Alain Frisch 84fc597314 Reduce diff.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:41:56 +00:00
Alain Frisch 84fb49c665 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:38:38 +00:00
Alain Frisch 4bd0d66cac Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15430 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:30:59 +00:00
Alain Frisch d5583e22fb Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:29:58 +00:00
Alain Frisch c04726c215 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:17:20 +00:00
Alain Frisch e0548c2ba2 Simplify: the inlined information does not need to be stored with type_descriptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 11:12:43 +00:00
Alain Frisch c341891a95 Change the definition of type parameters for the inline record types: for non-GADT constructors, we use the same type parameters as the sum type; for GADT constructors, we support for now only the case with 0 or 1 free variables in the record, and we use this list as type parameters (ordering is canonical). Support for GADT constructors with more than one free variables can be added later when a proper syntax is added to specify the ordered list of type variables.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15426 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:49:32 +00:00
Alain Frisch 90662da521 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:06:07 +00:00
Alain Frisch c767b9a299 Factorize.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15424 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 09:03:11 +00:00
Alain Frisch c0d246224a Integrate simple change from constructors_with_record4.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15423 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:58:06 +00:00
Alain Frisch 8ce82e2f63 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:51:15 +00:00
Alain Frisch a071918419 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15421 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:50:34 +00:00
Alain Frisch 70d201c968 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15420 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:47:44 +00:00
Alain Frisch 58cede37c8 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:46:21 +00:00
Alain Frisch f425cc7849 Factorize.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15418 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 08:38:18 +00:00
Jacques Garrigue 67f3768100 Fix PR#6593: Functor application in tests/basic-modules fails
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-02 00:43:01 +00:00
Alain Frisch c820a813d7 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 14:22:05 +00:00
Alain Frisch 8feec4d2aa The path under Tpackage doesn't refer to a type path (but to a module type path).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15409 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 12:31:24 +00:00
Alain Frisch 0508ce34f8 Proper error message.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15408 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 10:57:01 +00:00
Alain Frisch 3e4ecd96a4 Support referencing inline record types defined by the current type definition.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 10:47:19 +00:00
Jacques Garrigue e757455115 Fix PR#6465: allow incremental weakening of module aliases
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15405 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-01 09:07:14 +00:00
Alain Frisch 5afa84fdb8 Get rif of multiple exceptions with the same name in the same module.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 13:18:41 +00:00
Alain Frisch d4cb9063f1 Do not resolve Tpackage path with find_type (to be checked).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 13:09:34 +00:00
Alain Frisch aa2b9cbbdb Print inlined record type with a bang.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:43:17 +00:00
Alain Frisch a07fa4c556 Reduce diff with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15379 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:23:11 +00:00
Alain Frisch f7aea9bb53 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15378 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 12:17:03 +00:00
Alain Frisch 186847547f No need to track extension path in record_representation, infer it from the result type of the label.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15377 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 11:10:43 +00:00
Alain Frisch d19a43be70 Re-enable rebinding of extension constructors with inlined records.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15376 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 10:51:25 +00:00
Alain Frisch 5b9538aa3d Support for inlined records in extension constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 10:41:39 +00:00
Alain Frisch 4c378dc444 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 09:32:55 +00:00
Alain Frisch 26f6d39bb5 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15373 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 08:42:04 +00:00
Alain Frisch d1b95e90fe Towards sugar-less encoding of constructor types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15372 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 08:37:55 +00:00
Alain Frisch 6b080e669e Towards getting rid of the internal syntactic sugar.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15371 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-29 16:19:00 +00:00
Alain Frisch 6ca707d066 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15368 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-29 14:06:20 +00:00
Alain Frisch e8fd41e2e8 Get rid of type-qualifed constructor paths for extensible types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15355 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 16:25:29 +00:00
Alain Frisch 1f203ae846 Disallow multiple declaration of extension constructors with the same name in the same module.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15353 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 15:34:06 +00:00
Alain Frisch 1fb70280aa Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 11:46:54 +00:00
Alain Frisch 627dda3c43 Merge with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 11:35:29 +00:00
Alain Frisch eb893a5605 Fix merge problem.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 11:32:59 +00:00
Alain Frisch bd9c17c8d5 Make it clear that type-qualified constructors are only allowed in bang types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-25 15:22:06 +00:00
Alain Frisch 5dac90505f Allow qualified reference to constructors (at least in bang-types). A regular variant type supports qualified constructors of the form: M.t.X. An extensible variant type supports qualified constructors of the form: M.t.N.X.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-25 15:16:19 +00:00
Alain Frisch 4aa48476d8 Refer to the inlined record type as !M.Foo for a constructor M.Foo.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 16:06:09 +00:00
Alain Frisch 1701d2733b #5528: factorize the generation of names for inlined records.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15194 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-05 12:24:31 +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 2cf427beb3 #6529: the checked flag is now part of pers_struct.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15174 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-01 12:28:48 +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
Gabriel Scherer d875804d9c fix minor error-reporting bug
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-28 21:52: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 67151820dc #5528: type extensions can create local type names t.A without an explicit local type t (if the extended type is non-local). We must thus check explicitly uniqueness of synthesized type names t.A instead of relying on uniqueness of declared types as before (well, we already had the problem if someone redefined a local exn type).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15083 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 15:40:52 +00:00
Alain Frisch b115e37fc8 #5528: improve error reporting.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:57:13 +00:00
Alain Frisch 9fce02d524 #5528: improve error reporting.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15080 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:41:50 +00:00
Alain Frisch 9dcd1459fe #5528: support rebinding inlined extension constructors with free variables.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:32:23 +00:00
Alain Frisch bfba47f922 Cherry pick 15071 from 4.02 (Fix #6510: Removal of shadowed constructors of extensible types can break the structure of definitions).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15072 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 12:17:34 +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
Gabriel Scherer d59a10413f PR#6474: fix the "weak dependencies" support (patch by Leo White)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 11:39:21 +00:00
Gabriel Scherer 49d3f7b9f8 PR#6418: support "@[<hov %d>" in the new format implementation (Benoît Vaugon)
The bootstrap procedure, as for commit trunk@14973 (see there for
detailed build instructions), requires to first commit a temporary
patch:

> diff -Naur old/typing/typecore.ml new/typing/typecore.ml
> --- old/typing/typecore.ml        2014-06-11 18:16:24.851647309 +0200
> +++ new/typing/typecore.ml        2014-06-11 18:15:50.075646418 +0200
> @@ -2758,16 +2758,9 @@
>        let mk_int n = mk_cst (Const_int n)
>        and mk_string str = mk_cst (Const_string (str, None))
>        and mk_char chr = mk_cst (Const_char chr) in
> -      let mk_block_type bty = match bty with
> -        | Pp_hbox   -> mk_constr "Pp_hbox"   []
> -        | Pp_vbox   -> mk_constr "Pp_vbox"   []
> -        | Pp_hvbox  -> mk_constr "Pp_hvbox"  []
> -        | Pp_hovbox -> mk_constr "Pp_hovbox" []
> -        | Pp_box    -> mk_constr "Pp_box"    []
> -        | Pp_fits   -> mk_constr "Pp_fits"   [] in
>        let rec mk_formatting_lit fmting = match fmting with
> -        | Open_box (org, bty, idt) ->
> -          mk_constr "Open_box" [ mk_string org; mk_block_type bty; mk_int idt ]
> +        | Open_box _ ->
> +          assert false
>          | Close_box ->
>            mk_constr "Close_box" []
>          | Close_tag ->
> @@ -2950,6 +2943,19 @@
>            mk_constr "Alpha" [ mk_fmt rest ]
>          | Theta rest ->
>            mk_constr "Theta" [ mk_fmt rest ]
> +        | Formatting_lit (Open_box (org, _bty, _idt), rest) ->
> +          mk_constr "Formatting_gen" [
> +            mk_constr "Open_box" [
> +              mk_constr "Format" [
> +                mk_constr "String_literal" [
> +                  mk_string "<>";
> +                  mk_constr "End_of_format" [];
> +                ];
> +                mk_string "@[<>";
> +              ]
> +            ];
> +            mk_fmt rest;
> +          ]
>          | Formatting_lit (fmting, rest) ->
>            mk_constr "Formatting_lit" [ mk_formatting_lit fmting; mk_fmt rest ]
>          | Formatting_gen (fmting, rest) ->

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-14 21:08:50 +00:00
Gabriel Scherer 7cb9d0d84e PR#6418: fix format regression on "@{<..%d..%s..>" (Benoît Vaugon)
To be able to compile this patch, you should temporarily apply the
following patch to bootstrap the format type change:

> diff -Naur old/typing/typecore.ml new/typing/typecore.ml
> --- old/typing/typecore.ml	2014-06-06 03:37:03.240926150 +0200
> +++ new/typing/typecore.ml	2014-06-06 03:37:24.696926699 +0200
> @@ -2956,7 +2956,7 @@
>          | Theta rest ->
>            mk_constr "Theta" [ mk_fmt rest ]
>          | Formatting (fmting, rest) ->
> -          mk_constr "Formatting" [ mk_formatting fmting; mk_fmt rest ]
> +          mk_constr "Formatting_lit" [ mk_formatting fmting; mk_fmt rest ]
>          | Reader rest ->
>            mk_constr "Reader" [ mk_fmt rest ]
>          | Scan_char_set (width_opt, char_set, rest) ->

Bootstrap process:

  make core
  apply the patch above
  make core
  make promote-cross
  make partialclean
  revert the patch above, apply the commit
  make partialclean
  make core
  make coreboot

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:47 +00:00
Gabriel Scherer bb313fa192 Fix PR#6417: sprintf broken when local module named Pervasives is in scope
(Backport from Jacques' commit 4.02@14921)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:45 +00:00
Gabriel Scherer e0b000527b format+gadts: make format types "relational" to fix %(...%) typing
See the long comment in pervasives.ml for an explanation of the
change. The short summary is that we need to prove more elaborate
properties between the format types involved in the typing of %(...%),
and that proving things by writing GADT functions in OCaml reveals
that Coq's Ltac is a miracle of usability.

Proofs on OCaml GADTs are runtime functions that do have a runtime
semantics: it is legitimate to hope that those proof computations are
as simple as possible, but the current implementation was optimized
for feasability, not simplicity. François Bobot has some interesting
suggestions to simplify the reasoning part (with more equality
reasoning where I used transitivity and symmetry of the
relation profusely), which may make the code simpler in the future
(and possibly more efficient: the hope is that only %(...%) users will
pay a proof-related cost).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-21 13:23:13 +00:00
Gabriel Scherer 74b20bef58 replay trunk@14523: warn on non-principal format6 coercions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14 15:07:17 +00:00
Gabriel Scherer 3ffa399b37 Use a nominal datatype for CamlinternalFormat.format6
This should make the type-checking of formats simpler and more robust:
instead of trying to find a pair as previously, we can now use the
path of the format6 type directly.

A nice side-effect of the change is that the internal definition of
formats (as a pair) is not printed in error messages anymore.
Because format6 is in fact defined in the CamlinternalFormatBasics
submodule of Pervasives, and has an alias at the toplevel of
Pervasives, error messages still expand the definition:

> Error: This expression has type
>          ('a, 'b, 'c, 'd, 'd, 'a) format6 =
>            ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6
>        but an expression was expected of type ...

Passing the option `-short-paths` does avoid this expansion and
returns exactly the same error message as 4.01:

> Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6
>        but an expression was expected of type ...

(To get this error message without -short-paths, one would need to
define format6 directly in Pervasives; but this type is mutually
recursive with several GADT types that we don't want to add in the
Pervasives namespace unqualified. This is why I'll keep the alias
for now.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14 15:07:13 +00:00
Jacques Garrigue 14c7fc4a0c apply patch for PR#6420: Bad error message for non-exhaustive matching on extensible types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14859 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14 04:05:21 +00:00
Gabriel Scherer 4907bcf803 typecore.ml: fix format's expected-type mistake
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14826 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:07 +00:00
Gabriel Scherer ee90232220 add typer support for the new formats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14822 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:59 +00:00
Gabriel Scherer be3eca64ed update Benoît's patch wrt. Parsetree changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14808 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:33 +00:00
Gabriel Scherer 736876eaea convert Benoît's first patch to bytes/string
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14807 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:31 +00:00
Gabriel Scherer 43647ba502 first part of Benoît Vaugon's format-gadts patch
After applying this patch, you should run:

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:29 +00:00
Jacques Garrigue c36565a6c6 avoid warning just before an error happens using -no-alias-deps
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14797 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:42:15 +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 48ecf7eb15 Fix PR#6410: Error message for an attempt to use a functor as a module is confusing
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14790 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 08:13:04 +00:00
Jacques Garrigue d2194b72fe comment out Ctype.local_non_recursive_abbrev
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 07:48:55 +00:00
Jacques Garrigue eb2b1f64b1 indentation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14775 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 19:40:19 +00:00
Jacques Garrigue 7869662411 disable Clflags.transparent_modules when narrowing unbound identifier error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14774 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 19:35:54 +00:00
Jacques Garrigue b6500cc2a4 Fix PR#6405: unsound interaction of -rectypes and GADTs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14769 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 05:46:07 +00:00
Alain Frisch bfccd68ecc Protocol to allow ppx processors to report warnings to the compiler (reported as warning 22).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14762 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 14:52:19 +00:00
Alain Frisch f0ef09de26 Expose a Typemod.type_interface (currently an alias of Typemod.transl_signature) by symmetry with type_implementation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14759 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 12:46:00 +00:00
Alain Frisch 36b25ec2f6 Minor tweak to raw dump of parsetree/typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14758 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 11:14:57 +00:00
Jacques Garrigue 88e8bec163 Fix PR#6394: Assertion failed in Typecore.expand_path
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 10:55:05 +00:00
Alain Frisch 9961e6a1c2 #6399: protocol (based on a built-in ocaml.error extension node) to let ppx tools send located errors to be reported by the compiler (patch by Peter Zotov).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 08:26:17 +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
Alain Frisch 7e2333051a ocaml.warnerror built-in attribute.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14753 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-06 16:17:09 +00:00
Alain Frisch 0736512709 Revise behavior of ocaml.warning attribute: when used as a floating attribute (in a signature or structure), the scope is restricted to the current signature/structure instead of being global. Also support the new floating attributes in classes, with the same behavior.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14752 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-06 16:07:44 +00:00
Alain Frisch 110e97d400 When the payload of the ocaml.deprecated attribute is a string, report it as part of the warning message.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14751 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-06 14:39:51 +00:00
Alain Frisch 85a176334e Recognize both prefixed and unprefixed built-in attributes (e.g. ocaml.deprecated or deprecated).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14750 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-06 14:32:32 +00:00
Alain Frisch 27e9e78637 Accept a fully empty pattern matching. This can be generated by Camlp4 using its revised syntax, and this seems to be used in the wild.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14749 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 17:19:49 +00:00
Alain Frisch fa3224ec87 Indent + comment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14744 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:54:34 +00:00
Alain Frisch 0f1fb19cbe #6318: Extend match...with with exception cases. (Patch by Jeremy Yallop, backend part by A. Frisch).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14743 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:49:37 +00:00
Alain Frisch 0b3423ef2c #6387: also allow attributes on methods in object types (< m [@foo] : int; ..>).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:21:45 +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
Alain Frisch 0f1bb864df Add support for floating attributes in class structures and class signatures. (Patch by Leo White.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:42:34 +00:00
Jacques Garrigue b78b19975a * Do not require cmi file to be present if module alias is not accessed
(using -trans-mod)
* Add warning 49 for that case; use same warning in place of deprecated
  for Env.scrape_alias


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14724 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 07:07:09 +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
Alain Frisch b791d666d8 #6387: allow attributes on variants in polymorphic variant types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14712 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:19:55 +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
Jacques Garrigue 48f52f450c merge Leo's patch for PR#6384
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 02:25:04 +00:00
Jacques Garrigue 6cb386e91c Fix PR#6383: Exception Not_found when using object type in absent module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 13:29:51 +00:00
Damien Doligez 0cba565437 fix some whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 22:34:13 +00:00
Jacques Garrigue 979fe8b8ad Do not add absolute paths for information added to
the local environment in Env.components_of_module_make.
Fixes the bug reported by Mark Shinwell on caml-devel,
on 2014-04-23. This bug was related to module aliases.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14674 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 09:09:08 +00:00
Alain Frisch 9e23ded0d1 Check unicity of types introduced through exceptions. Do not discard exceptions from signatures if they introduce a type.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 16:09:31 +00:00
Alain Frisch dfce13de92 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14661 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:40:51 +00:00
Alain Frisch db015c2670 More precise location on 'name must be unique' error (report the identifier name instead of the whole declaration).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:34:52 +00:00
Alain Frisch 3b6c0c88a5 Make Parsetree more uniform by keeping locations in all records which have attributes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14659 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:28:20 +00:00
Alain Frisch af3d4aa91f Better locations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14658 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:36:29 +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 307caebc7a Proper renaming of the ident in Cstr_record during signature substitution.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14656 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:14:38 +00:00
Alain Frisch 942046117f Consider that exceptions with a record argument create an implicit type.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 12:35:02 +00:00
Jacques Garrigue 82e2f35a14 Fix PR#6376
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21 10:38:04 +00:00
Alain Frisch c92bbee07d The type parameters of inlined record types are free variables that appear in the record definition (in order of syntactic appearance), both for GAT and non-GADT constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14640 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 13:20:47 +00:00
Alain Frisch a527dcf467 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14639 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 13:10:43 +00:00
Alain Frisch 3a89e6804a Do not register labels of inlined records into the environment; they can only be used through type-based selection. Silence out-of-scope and disambiguated warnings when they are selected.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 12:55:10 +00:00
Jacques Garrigue 5db6318900 Fix PR#6371
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 06:16:05 +00:00
Alain Frisch 6fe5dd7cf4 Turn more sig/str items into records. Patch from Leo White.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 11:26:00 +00:00
Alain Frisch c239f181be Add back support for explicit_arity mode on constructor expressions and patterns, now relying on an attribute. This has been requested to preserve Camlp5's behavior.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14595 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 09:53:51 +00:00
Alain Frisch 23b1a99802 Use 'ocaml.' prefix for built-in attributes ocaml.warning, ocaml.deprecated. Later, there will be a warning when an unknown ocaml.* attribute is used.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14591 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14 15:15:39 +00:00
Alain Frisch 6346154d4b Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14 11:52:29 +00:00
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Fabrice Le Fessant 2859498cad Add %loc_* primitives and corresponding values in Pervasives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-10 14:11:25 +00:00
Alain Frisch 907c477c02 Produce type equation on exception rebinding with a record argument.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09 17:38:08 +00:00
Alain Frisch 3296c74189 Continue support for record argument on exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14569 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09 16:52:11 +00:00
Alain Frisch 65f986d784 Starting support for exceptions with record arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14568 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09 16:14:37 +00:00
Jacques Garrigue fb74ef5e51 Fix PR#6365
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14565 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-09 04:01:26 +00:00
Alain Frisch 632eb11246 For GADT constructors, the type parameters of the original sum type cannot be used for the synthesized record types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08 15:52:14 +00:00
Alain Frisch ef1b5e59cf Support for GADT constructors with record syntax. For now, do not try to infer a clever variance, nor a predictible ordering, for the extra arguments on synthesized types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14562 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08 13:48:23 +00:00
Alain Frisch dc88cf81b8 Polymorphic fields are actually ok.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14561 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08 13:38:08 +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
Luc Maranget fcf3571123 Folllowup to PR#6359, great cleanup of switch actions sharing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:43:20 +00:00
Alain Frisch 87c8973069 Find the id for local synthesized record types in the environment.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14557 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:16:38 +00:00
Alain Frisch 0b0d14e7a0 Fix re-export with a different name.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 14:58:23 +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 e90f525167 Remove debug.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14550 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 13:01:51 +00:00
Alain Frisch 601ba91a29 Printer for exception with inline records.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14549 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 12:53:59 +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
Damien Doligez e8d15e704c merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision 14525)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 17:32:35 +00:00
Alain Frisch fa13304327 Distinguish explicitly representation of regular records and inlined records with tag = 0.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14531 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 12:37:49 +00:00
Alain Frisch ab7b60aa8d Support exception rebinding.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14530 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 12:25:21 +00:00
Alain Frisch 1d5122c2ef Get rid of 'as' clause in inline records. Support re-export of sum types with inline records.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14529 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 08:57:05 +00:00
Jacques Garrigue fc61342e09 Fix PR#6348
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14528 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 04:17:20 +00:00
Jacques Garrigue 2699d155a0 Fix PR#6352
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14524 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03 03:59:17 +00:00
Jacques Garrigue 12a2e9fa03 comment 9644 of PR#6000: principality check for coercion to format
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03 02:52:51 +00:00
Alain Frisch 440a649ba6 Revert bad change included in previous commit, which broke tests/typing-module/firstclass.ml (more phrases were accepted by the type-checker).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14522 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02 20:38:29 +00:00
Alain Frisch 0c4c54c990 Get rid of ocamlcomp.sh. The next step is to share all those common declarations for calling the compilers from various places.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14521 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02 16:20:38 +00:00
Alain Frisch 6f2fc3f8b0 Allow to give an explicit name (and specify parameters) for inlined records.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14519 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 16:15:07 +00:00
Alain Frisch 9b97c9e5c0 Always keep the original type parameters (with ordering) for synthesized record type declarations. Add required existentials, sorted alphabetically.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14518 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 12:22:35 +00:00
Alain Frisch 06f465992a Switch to t.A syntax for synthesized types. Allow the user to refer to such as type.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 11:55:01 +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 f226f0d26b Cleanup (use attributes to pass information).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14509 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 14:08:00 +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 c36fb6d83e Type-check constructor creation with a record argument.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14506 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28 17:24:17 +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
Alain Frisch da5b063687 #6352: add a warning on implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:09:28 +00:00
Alain Frisch e2493160d0 Get rid of some uses of implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:08:51 +00:00
Alain Frisch 6a39aa1e7a Get rid of some uses of implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14496 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:00:48 +00:00
Alain Frisch f6b9b99a44 Get rid of some uses of implicit removal of optional arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14495 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:00:16 +00:00
Jacques Garrigue e39065c72b Optimize Env.find_module further for PR#6350
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14483 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-23 00:06:41 +00:00
Jacques Garrigue 1302703293 Fix PR#6350
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14482 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-22 15:49:57 +00:00
Luc Maranget c2a88c27fd #PR6269 Optimized string matching
Noticed that I had to bootstrap to test on ARM, so I commit  a new bootstrap
compiler.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Gabriel Scherer 9e410c0cfe Shorten syntax for functor signatures (patch by Thomas Gazagnaire)
```
(* Optional naming of parameter implementation *)
module type X = functor (X:S) -> ...
module type X = functor (_:S) -> ...

(* shortening of functor module signatures *)
module type F = functor (X:S) -> functor (Y:S) -> ...
module type F = functor (X:S) (Y:S) -> ...
```

For consistency reasons, this commits also add shortening of functor implementations:

```
(* shortening of functor implementations *)
module F = functor (X:S) -> functor (Y:S) -> ...
module F = functor (X:S) (Y:S) -> ...
```

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 15:21:00 +00:00
Jacques Garrigue 65b1193406 Fix PR#6307
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:54:02 +00:00
Jacques Garrigue d59bd570d7 Structural typing of first class modules (cf. PR#6333)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:06:10 +00:00
Alain Frisch 4907f6ca76 #5779: improve support for structured constants (better propagation, sharing, cleaner representation). Also fix #6337 (constants emitted several times).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-06 17:03:16 +00:00
Jacques Garrigue eaf5646196 Fix PR#6331
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-25 08:16:25 +00:00
Alain Frisch 663c098be6 Add location to module and module type definitions. Improves #6311.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 12:18:34 +00:00
Alain Frisch b81e8ecc3d #6311: show kind and location of missing item, in case of signature mismatch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 09:55:35 +00:00
Alain Frisch 10abdce7b1 Record inclusion checks between value_descriptions in .cmt files. This makes it easy in particular to track in external tools value declarations between implementations and interfaces.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 11:07:02 +00:00
Alain Frisch 9de0cd21fd #6308: better error message when the types inferred for a variable on both sides of an or-pattern don't match.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14421 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-27 16:27:05 +00:00
Jacques Garrigue eaa8a78f94 Fix PR#6303
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 01:58:37 +00:00
Jacques Garrigue 950be999e6 Fix PR#6293
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14400 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-14 11:29:02 +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
Jacques Garrigue cfa350c31a merge generative functors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-17 03:52:50 +00:00
Jacques Garrigue 024c8ad498 Fix PR#6275
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14363 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-17 01:39:41 +00:00
Alain Frisch 7b514efefb Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-11 14:56:57 +00:00
Alain Frisch 32dddc3f82 #6262: equality of first-class modules take module type aliases into account. Fix interaction with module inclusion.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14342 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-05 14:57:10 +00:00
Alain Frisch 2086ac55e6 #6246: allow wildcard pattern as for-loop index. ==> Camlp4 will need to be adapted.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-02 18:00:18 +00:00
Jacques Garrigue 9b974c162f Fix PR#6241
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-19 11:07:39 +00:00
Jacques Garrigue c20af454f3 Fix PR#6240
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14301 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-18 06:44:13 +00:00
Jacques Garrigue 2a011d7095 Fix PR#6240
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14299 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-18 01:26:40 +00:00
Jacques Garrigue bedaff5138 fix computation of position
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-16 10:26:19 +00:00
Jacques Garrigue b4f8172430 also generate module aliases when using include
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14295 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-15 15:19:25 +00:00
Jacques Garrigue b7ab7460d5 Fix PR#6235 + keep typing of pattern cases independent in principal mode
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 00:16:03 +00:00
Jacques Garrigue 7110a56ab0 expand module aliases and type identifiers in "module type of"
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14282 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-11 14:00:38 +00:00
Jacques Garrigue 5d379f7706 use new scrape_alias for Env too
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14281 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-11 05:00:10 +00:00
Jacques Garrigue 956e258a12 use a strengthening version of scrape_alias in Typemod
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14279 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-11 03:37:46 +00:00