diff options
| author | Pierre-Marie Pédrot | 2016-09-21 13:59:35 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2016-09-21 13:59:35 +0200 |
| commit | bd81eaef87c5eb3a5d5bf398e151235e4e5c81a1 (patch) | |
| tree | 72246effa2d991b2370aa77f7f8f00ce5fe6c395 /interp | |
| parent | 9c352481f1a2d3a9c2e0e1f084d1c65521a0c438 (diff) | |
Fix an error-prone error API.
Diffstat (limited to 'interp')
| -rw-r--r-- | interp/constrintern.ml | 4 | ||||
| -rw-r--r-- | interp/topconstr.ml | 2 | ||||
| -rw-r--r-- | interp/topconstr.mli | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml index fb11359e3c..0e56020783 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -1208,7 +1208,7 @@ let drop_notations_pattern looked_for = if top then looked_for g else match g with ConstructRef _ -> () | _ -> raise Not_found with Not_found -> - error_invalid_pattern_notation ~loc + error_invalid_pattern_notation ~loc () in let test_kind top = if top then looked_for else function ConstructRef _ -> () | _ -> raise Not_found @@ -1349,7 +1349,7 @@ let drop_notations_pattern looked_for = | NHole _ -> let () = assert (List.is_empty args) in RCPatAtom (loc, None) - | t -> error_invalid_pattern_notation ~loc + | t -> error_invalid_pattern_notation ~loc () in in_pat true let rec intern_pat genv aliases pat = diff --git a/interp/topconstr.ml b/interp/topconstr.ml index 0f894019b0..eb564f3b32 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -32,7 +32,7 @@ let _ = Goptions.declare_bool_option { (**********************************************************************) (* Miscellaneous *) -let error_invalid_pattern_notation ?loc = +let error_invalid_pattern_notation ?loc () = user_err ?loc (str "Invalid notation for pattern.") (**********************************************************************) diff --git a/interp/topconstr.mli b/interp/topconstr.mli index ac98331c6b..95d702f8d5 100644 --- a/interp/topconstr.mli +++ b/interp/topconstr.mli @@ -46,4 +46,4 @@ val patntn_loc : (** For cases pattern parsing errors *) -val error_invalid_pattern_notation : ?loc:Loc.t -> 'a +val error_invalid_pattern_notation : ?loc:Loc.t -> unit -> 'a |
