alainfrisch
502e4f9336
More warnings when compiling the compiler.
2016-03-15 22:46:35 +01: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
Jeremie Dimino
43111b38cd
Replace uses of [Syntaxerr.ill_formed_ast] by asserts
...
All invariants are already checked by [Ast_invariants]
2016-01-27 18:41:12 +00:00
alainfrisch
09bc267038
Simplify.
2016-01-19 23:42:54 +01:00
alainfrisch
87de6a160d
Useless bindings, unit patterns, whitespace.
2016-01-19 23:40:55 +01:00
alainfrisch
7ad212045f
Add module to deal with 'front-end' built-in attributes.
2015-12-02 14:46:14 +01:00
alainfrisch
10fbfe7643
Pass location to Env.lookup_ functions explicitly.
2015-12-02 10:21:24 +01:00
alainfrisch
3842acd676
Avoid warning duplication: checking module deprecation is done in Env.
2015-12-01 18:01:59 +01:00
alainfrisch
56a094e8e6
Recognize ocaml.deprecated floating attribute on top of .ml files to support marking the unit as deprecated even if it has no .mli file.
2015-12-01 17:55:26 +01:00
alainfrisch
114e733864
Store deprecated flag in 'module components' and raise the deprecated warning when accessing a component from a deprecated module if is has been marked, even for non-toplevel modules.
2015-12-01 17:11:27 +01:00
alainfrisch
c95f85a3f4
Interpret deprecation warning when looking up external units.
2015-11-27 19:31:58 +01:00
alainfrisch
945d0c7d7a
Keep deprecation flag on compilation unit, extracted from a floating attribute in the .mli file.
2015-11-27 19:13:56 +01:00
Leo White
99ad68d256
Improve error for ill-typed functor application
2015-10-26 10:32:41 +00:00
Leo White
15cc266e2f
Better -no-alias-deps errors
2015-10-22 17:11:08 +01:00
Gabriel Scherer
41a8aa5771
PR#7012: hint when using [ 'A | 'B ] instead of [ B ]
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16519 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-17 13:46:02 +00:00
Gabriel Scherer
c23132d6fc
Revert "PR#7012: hint when using [ 'A | 'B ] instead of [ B ]"
...
(Sent the wrong patch version)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16518 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-17 13:46:00 +00:00
Gabriel Scherer
88fe01cc5b
PR#7012: hint when using [ 'A | 'B ] instead of [ B ]
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16517 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-17 13:42:00 +00:00
Alain Frisch
3856cd00c5
Remove dead code.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-16 14:55:15 +00:00
Jacques Garrigue
0a4f57d5b7
Fix PR#7012
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16489 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-10 07:22:35 +00:00
Jacques Garrigue
8873757fb1
partial fix of PR#5780
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16411 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-09 08:51:02 +00:00
Alain Frisch
11333d938c
#6583 : support for custom #... binary operators (also allowing '#' in trailing symbols, although the operator is then rejected by the type-checker).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-09 17:39:50 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
8fb5fdc9f2
merge trunk:14244 to fix bootstrap
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-24 04:19:08 +00:00
Alain Frisch
01aaf23e20
#6205 : add Hint before spellchecking suggestion.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14220 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-10 08:45:40 +00:00