Commit Graph

1334 Commits (bdeeab69ebde4102b39ccbe73b2e8c5801af46fb)

Author SHA1 Message Date
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 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
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
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
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
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
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
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
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 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