diff options
| author | ppedrot | 2013-02-18 19:45:36 +0000 |
|---|---|---|
| committer | ppedrot | 2013-02-18 19:45:36 +0000 |
| commit | 4c1ccb9e2a4b219ac5180115bc4267e1b059cdd1 (patch) | |
| tree | 9ecfc27037e02802b1e6884517ca930cb8197cbc /pretyping | |
| parent | b101df5536146b9c3cd3569fc3b6334650f2a300 (diff) | |
Removing Exc_located and using the new exception enrichement
mechanism to retrieve the same information.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16215 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/cases.ml | 4 | ||||
| -rw-r--r-- | pretyping/pretype_errors.ml | 3 | ||||
| -rw-r--r-- | pretyping/typeclasses_errors.ml | 7 |
3 files changed, 5 insertions, 9 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml index 2910774db6..358cc2f034 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -69,9 +69,7 @@ let rec list_try_compile f = function | [] -> anomaly (str "try_find_f") | h::t -> try f h - with UserError _ | TypeError _ | PretypeError _ | PatternMatchingError _ - | Loc.Exc_located - (_, (UserError _ | TypeError _ | PretypeError _ | PatternMatchingError _)) -> + with UserError _ | TypeError _ | PretypeError _ | PatternMatchingError _ -> list_try_compile f t let force_name = diff --git a/pretyping/pretype_errors.ml b/pretyping/pretype_errors.ml index 5403c1e99e..91d24ec698 100644 --- a/pretyping/pretype_errors.ml +++ b/pretyping/pretype_errors.ml @@ -53,8 +53,7 @@ exception PretypeError of env * Evd.evar_map * pretype_error let precatchable_exception = function | Errors.UserError _ | TypeError _ | PretypeError _ - | Loc.Exc_located(_,(Errors.UserError _ | TypeError _ | - Nametab.GlobalizationError _ | PretypeError _)) -> true + | Nametab.GlobalizationError _ -> true | _ -> false (* This simplifies the typing context of Cases clauses *) diff --git a/pretyping/typeclasses_errors.ml b/pretyping/typeclasses_errors.ml index cfcf9cf43f..d0d90017fd 100644 --- a/pretyping/typeclasses_errors.ml +++ b/pretyping/typeclasses_errors.ml @@ -39,14 +39,13 @@ let unsatisfiable_constraints env evd ev = | None -> raise (TypeClassError (env, UnsatisfiableConstraints (evd, None))) | Some ev -> - let loc, kind = Evd.evar_source ev evd in - raise (Loc.Exc_located (loc, TypeClassError - (env, UnsatisfiableConstraints (evd, Some (ev, kind))))) + let loc, kind = Evd.evar_source ev evd in + let err = TypeClassError (env, UnsatisfiableConstraints (evd, Some (ev, kind))) in + Loc.raise loc err let mismatched_ctx_inst env c n m = typeclass_error env (MismatchedContextInstance (c, n, m)) let rec unsatisfiable_exception exn = match exn with | TypeClassError (_, UnsatisfiableConstraints _) -> true - | Loc.Exc_located(_, e) -> unsatisfiable_exception e | _ -> false |
