summaryrefslogtreecommitdiff
path: root/src/pattern_completeness.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-10-31 15:43:56 +0000
committerAlasdair Armstrong2018-10-31 15:43:56 +0000
commit001e28b487c8a4cb2a25519a3acc8ac8c1aaabf5 (patch)
treec50d5a7bb026e875db96af53fd44d58387d7a7c6 /src/pattern_completeness.ml
parent5298e209f0ae12e51f3050888e18ad9be09543e4 (diff)
Rename Reporting_basic to Reporting
There is no Reporting_complex, so it's not clear what the basic is intended to signify anyway. Add a GitHub issue link to any err_unreachable errors (as they are all bugs)
Diffstat (limited to 'src/pattern_completeness.ml')
-rw-r--r--src/pattern_completeness.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pattern_completeness.ml b/src/pattern_completeness.ml
index d54bbd3f..514eb5c0 100644
--- a/src/pattern_completeness.ml
+++ b/src/pattern_completeness.ml
@@ -269,7 +269,7 @@ let combine ctx gpat (l, pat) =
(* This warning liable to false positives as join returns a
pattern that overapproximates what can match, so we only
report when the second match is a constructor. *)
- Util.warn (Printf.sprintf "Possible redundant pattern match at %s\n" (Reporting_basic.loc_to_string l));
+ Util.warn (Printf.sprintf "Possible redundant pattern match at %s\n" (Reporting.loc_to_string l));
GP_wild
| _, gpat' -> join ctx gpat gpat'
@@ -287,7 +287,7 @@ let shrink_loc = function
let check l ctx cases =
match cases_to_pats cases with
- | [] -> Util.warn (Printf.sprintf "No non-guarded patterns at %s\n" (Reporting_basic.loc_to_string (shrink_loc l)))
+ | [] -> Util.warn (Printf.sprintf "No non-guarded patterns at %s\n" (Reporting.loc_to_string (shrink_loc l)))
| (_, pat) :: pats ->
let top_pat = List.fold_left (combine ctx) (generalize ctx pat) pats in
if is_wild top_pat then
@@ -295,7 +295,7 @@ let check l ctx cases =
else
let message =
Printf.sprintf "Possible incomplete pattern match at %s\n\nMost general matched pattern is %s\n"
- (Reporting_basic.loc_to_string (shrink_loc l))
+ (Reporting.loc_to_string (shrink_loc l))
(string_of_gpat top_pat |> Util.cyan |> Util.clear)
in
Util.warn message