diff options
| author | Arnaud Spiwack | 2016-04-05 09:25:54 +0200 |
|---|---|---|
| committer | Arnaud Spiwack | 2016-04-05 09:25:54 +0200 |
| commit | 64e94267cb80adc1b4df782cc83a579ee521b59b (patch) | |
| tree | 9539fe83b8d89fed912810ab129d77f1ea4f9dd7 | |
| parent | 8886dfd8fbb53d8305f2aa72afab8377b3fa75b7 (diff) | |
Revert "Prevent pretyping from checking well-guardedness unnecessarily."
This reverts commit 9f4e67a7c9f22ca853e76f4837a276a6111bf159.
| -rw-r--r-- | pretyping/pretyping.ml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml index 94749648e0..d9f490ba55 100644 --- a/pretyping/pretyping.ml +++ b/pretyping/pretyping.ml @@ -73,9 +73,14 @@ let search_guard loc env possible_indexes fixdefs = (* We treat it separately in order to get proper error msg. *) let is_singleton = function [_] -> true | _ -> false in if List.for_all is_singleton possible_indexes then - (* in this case, errors are delegated to the kernel, which will - check well-guardedness if required. *) - Array.of_list (List.map List.hd possible_indexes) + let indexes = Array.of_list (List.map List.hd possible_indexes) in + let fix = ((indexes, 0),fixdefs) in + (try check_fix env ~chk:true fix + with reraise -> + let (e, info) = Errors.push reraise in + let info = Loc.add_loc info loc in + iraise (e, info)); + indexes else (* we now search recursively among all combinations *) (try |
