Commit Graph

105 Commits (49aa87c316c441aa47974e8e9191a5a7e6d03d9a)

Author SHA1 Message Date
hhugo 49aa87c316
Introduce warning 68 to warn about hidden allocation due to pattern match of mutable field in curried functions (#9751)
Introduce new warning 68
2020-08-17 09:47:36 +01:00
Nicolás Ojeda Bär fb76c322b4 Rename Ignored_argument => Ignored_extra_argument 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 9ac31c224c Rename No_unsafe_array_syntax_without_parsing => Unsafe_array_syntax_without_parsing 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 958281de38 Rename Unreachable_argument => Ignored_argument 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 06f1a66f96 Rename Unused_subpat => Redundant_subpat 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 47c0e44d63 Rename Unused_case => Redundant_case 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär ca4b8dcbd7 Rename Non_closed_record_pattern => Missing_record_field_pattern 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär f3c6b16ad7 Rename Partial_application => Ignored_partial_application 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär f9786a9cb2 Rename Unsafe_without_parsing => No_unsafe_array_syntax_without_parsing 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 85a7e8ef31 Rename Assignment_to_non_mutable_value => Flambda_assignment_to_non_mutable_value 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 14f8fa58ec Rename Ambiguous_pattern => Ambiguous_var_in_pattern_guard 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 5789d6c6df Rename Expect_tailcall => Tailcall_expected 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär a0cef9fdc6 Rename Bad_docstring => Unexpected_docstring 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 9f9cc29fd8 Rename Multiple_definition => Module_linked_twice 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 358a6c1ae8 Rename Unused_argument => Unreachable_argument 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär e05f119ea1 Rename Without_principality => Non_principal_labels 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär b2606e0f18 Rename Unused_pat => Unused_subpat 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär 45d14467cd Rename Unused_match => Unused_case 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär fd48548c05 Rename Statement_type => Non_unit_statement 2020-07-20 08:31:18 +02:00
Thomas Refis 79f1c73462
Warn about unused functor parameters (#8891) 2019-10-14 11:11:01 +01:00
Alain Frisch 2e5b9d1ef1
"Alerts" as a generalization of "deprecated" (#1804) 2018-11-15 09:51:35 +01:00
Alain Frisch 7baf33d6ad
Fix PR6638: add dedicated wrning for "unused open!" (#1110) 2018-11-09 13:41:34 +01:00
Armaël Guéneau 72f472c860 Add a warning triggered on type declarations "type t = ()"
These are most likely a mistake for "type t = unit", but still valid, and lead
to quite confusing error messages afterwards because now `()` denotes two
different incompatible constructors.
2018-10-05 12:12:26 +02:00
Florian Angeletti 558530a8b4 manual: compiler-libs.mld -> compiler_libs.mld 2018-09-12 16:32:37 +02:00
Florian Angeletti ef135a71ae
MPR7546, manual: preambles and warnings for compiler-libs modules (#2020)
* preambles for compiler-libs modules

* Compilerlibs intro and warning link
2018-09-12 09:51:47 +02:00
Valentin Gatien-Baron 3d0299a185 Create warning 64, for uses of -unsafe with a -pp that returns a marshalled ast
Instead of the current print to stderr. This way it's treated the same
as other warnings: it has a position, colors, can be made an error,
disabled, goes in the expected formatter, is documented.
2018-07-15 15:08:38 -04:00
Florian Angeletti 349db3d869
PR#6416 et al.: injective mapping between identifiers and printed names (#1120) 2018-06-26 22:03:45 +02:00
alainfrisch 895a7f4443 Continue + expect test. 2017-09-12 00:35:58 +02:00
Leo White 2fc41796c8 Prevent repeated warnings with recursive modules 2017-09-11 16:57:34 +01:00
Thomas Refis 1747a2f0eb Mention deprecated warning 25 in manual and man page
* warning 25: updated the man page

* warning 25: update the manual
2017-07-10 18:18:37 +02:00
alainfrisch f6d53cc38f Deprecation warning when checking signature inclusion
Deprecation warning (3) is currently only reported when directly
accessing a component marked with the deprecated attribute; but it is
missed when we coerce the signature contaning the deprecated component
to a signature without the attribute.

This commit adds the required machinery to detect such cases
and report the same warning. (An alternative design could be
to introduce a new warning for that purpose.)

Some of the new machinery could be used for other purposes:

  - During the inclusion check, keep the location that would used in
    the error message if the check fails.

  - Warnings can now hold extra "sub-locations" (and associated
    messages).
2017-04-05 19:13:59 +02:00
Jacques Garrigue 47eb55f1b4 Add warning for PR#7261 2017-03-14 13:03:19 +09:00
sliquister 356d8a9c0c Changing the display of fatal warnings (#948) 2017-03-08 09:16:01 +00:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
alainfrisch 32f0e2120c Detect unused module declarations. 2016-07-18 10:35:19 +02:00
Gabriel Scherer 542fcdea6e PR#7139: clearer formulation of warning on unused exceptions 2016-05-02 14:37:39 -04: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
Mark Shinwell ceec2b9759 rename 2016-01-14 12:03:17 +00:00
Mark Shinwell 0f3c60b9ff New warning 2016-01-14 12:00:43 +00:00
Leo White 9216c69017 Add warning for missing .cmx files 2015-12-26 08:29:47 +00:00
Luc Maranget 6a89000b5c PR#7031 ambiguous guarded or-pattern.
- Check proper (in parmatch.ml)
  - Call check just after unused pattern check (in typecore.ml, correct ?)
  - Define and print warning (in warning.ml)
2015-12-14 15:58:02 +01:00
alainfrisch 837bcd6e7b PR#6396: Warnings-as-errors not properly flushed in the toplevel. 2015-12-03 14:31:46 +01:00
Leo White 74215da003 Fix PR6998 2015-11-04 11:01:33 +00:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Mark Shinwell e27e699fca GPR#173: Attributes to control inlining
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16530 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:18:08 +00:00
Jacques Garrigue b784b65925 add distinct warning for unreachable cases
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16504 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 15:39:59 +00:00
Alain Frisch a21eaeaa40 GPR#254: @ocaml.arg_on_literal_pattern attribute on constructors
to warn when the argument is matches against a constant pattern.
This attributes is applied on predefined exception constructors
which take an purely informational (with no stability guarantee)
message.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 12:30:10 +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 e9785253b2 PR#6876: improve warning 6 by listing the omitted labels.
(Eyyüb Sari)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-24 07:33:32 +00:00
Gabriel Scherer f9ea209cb7 GPR#171: allow custom warning printers / catchers
(Benjamin Canou, review by Damien Doligez)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16049 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 21:05:26 +00:00