diff options
| author | delahaye | 2001-01-03 15:55:07 +0000 |
|---|---|---|
| committer | delahaye | 2001-01-03 15:55:07 +0000 |
| commit | 191aa5a3a923654d01c35a145a63166a28a2b886 (patch) | |
| tree | 41a0e44ac92c3eebd8a4a032d3641ecafcc59383 | |
| parent | b20e1be71f9b5c5585b214e30b5042676fa6cd46 (diff) | |
Rattrapage d'erreur pour le Case + Eval Compute in pour Definition
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1232 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | pretyping/pattern.ml | 6 | ||||
| -rw-r--r-- | toplevel/command.ml | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/pretyping/pattern.ml b/pretyping/pattern.ml index 4b94fe8b4e..d1566419cc 100644 --- a/pretyping/pattern.ml +++ b/pretyping/pattern.ml @@ -181,8 +181,10 @@ let matches_core convert pat c = | PCase (_,a1,br1), IsMutCase (_,_,a2,br2) -> (* On ne teste pas le prédicat *) - array_fold_left2 (sorec stk) (sorec stk sigma a1 a2) - br1 br2 + if (Array.length br1) = (Array.length br2) then + array_fold_left2 (sorec stk) (sorec stk sigma a1 a2) br1 br2 + else + raise PatternMatchingFailure (* À faire *) | PFix f0, IsFix f1 when f0 = f1 -> sigma | PCoFix c0, IsCoFix c1 when c0 = c1 -> sigma diff --git a/toplevel/command.ml b/toplevel/command.ml index d1b9ba4fe1..2055e5b8af 100644 --- a/toplevel/command.ml +++ b/toplevel/command.ml @@ -67,10 +67,10 @@ let definition_body_red red_option ident (local,n) com comtypeopt = let ce = constant_entry_of_com (com,comtypeopt) in let ce' = red_constant_entry ce red_option in match n with - | NeverDischarge -> declare_global_definition ident ce n local + | NeverDischarge -> declare_global_definition ident ce' n local | DischargeAt disch_sp -> if Lib.is_section_p disch_sp then begin - let c = constr_of_constr_entry ce in + let c = constr_of_constr_entry ce' in declare_variable ident (SectionLocalDef c,n,false); if is_verbose() then message ((string_of_id ident) ^ " is defined"); if Pfedit.refining () then |
