diff options
| -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 |
