branch: elpa/tuareg commit b62d4ee28939af67d178ade03546dee7a8dca851 Author: Mattias EngdegÄrd <matti...@acm.org> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Add genuine example of warning with ancillary locations Remove the previous such examples in compilation.txt as they were all fake (error messages edited to pass as warnings). --- compilation.txt | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/compilation.txt b/compilation.txt index d88a348..df2b784 100644 --- a/compilation.txt +++ b/compilation.txt @@ -93,26 +93,6 @@ Error: This expression has type M/2.t but an expression was expected of type File "main.ml", line 7, characters 0-32: Definition of module M/2 -File "main.ml", line 13, characters 34-35: -13 | let f : M.t -> M.t = fun M.C -> y - ^ -Warning 3: This expression has type M/2.t but an expression was expected of type - M/1.t - File "main.ml", lines 10-12, characters 2-5: - Definition of module M/1 - File "main.ml", line 7, characters 0-32: - Definition of module M/2 - -File "main.ml", line 13, characters 34-35: -13 | let f : M.t -> M.t = fun M.C -> y - ^ -Warning 3: This expression has type M/2.t but an expression was expected of type - M/1.t - File "main.ml", lines 10-12, characters 2-5: - Definition of module M/1 - File "main.ml", line 7, characters 0-32: - Definition of module M/2 - * Since OCaml 4.12, warnings come with mnemonics. @@ -122,6 +102,22 @@ File "moo.ml", line 6, characters 6-10: Warning 26 [unused-var]: unused variable fish. +* Example of a warning with ancillary locations + +File "urk.ml", line 1: +Warning 63 [erroneous-printed-signature]: The printed interface differs from the inferred interface. +The inferred interface contained items which could not be printed +properly due to name collisions between identifiers. +File "urk.ml", lines 23-25, characters 2-5: + Definition of module M/1 +File "urk.ml", lines 17-20, characters 0-3: + Definition of module M/2 +Beware that this warning is purely informational and will not catch +all instances of erroneous printed interface. +module M : sig type t val v : t end +module F : sig module M : sig val v : M.t end val v : M/2.t end + + * Alert: treat like warning File "alrt.ml", line 25, characters 9-10: