diff options
author | 2003-04-03 06:43:24 +0000 | |
---|---|---|
committer | 2003-04-03 06:43:24 +0000 | |
commit | 2573aade356a0a45f5fb5f4e6705133139560c48 (patch) | |
tree | c3e87a30eceea679eb7a88a7f9ffb0b1b2432094 /contrib/field/field.ml4 | |
parent | 546c140a449ef8b4020d906441b4b060c928f75e (diff) |
Légères simplifications code de Field; message d'erreur si pas égalité
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3841 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/field/field.ml4')
-rw-r--r-- | contrib/field/field.ml4 | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/field/field.ml4 b/contrib/field/field.ml4 index c1ba413f0..0c908e1ad 100644 --- a/contrib/field/field.ml4 +++ b/contrib/field/field.ml4 @@ -140,14 +140,13 @@ END let field g = Library.check_required_library ["Coq";"field";"Field"]; let ist = { lfun=[]; lmatch=[]; debug=get_debug () } in - let typ = constr_of_VConstr (pf_env g) (val_interp ist g - <:tactic< Match Context With [|- (eq ?1 ? ?)] -> ?1>>) in + let typ = + match Hipattern.match_with_equation (pf_concl g) with + | Some (eq,t::args) when eq = Coqlib.build_coq_eq_data.Coqlib.eq () -> t + | _ -> error "The statement is not built from Leibniz' equality" in let th = VConstr (lookup typ) in (tac_interp [(id_of_string "FT",th)] [] (get_debug ()) - <:tactic< - Match Context With - | [|- (eq ?1 ?2 ?3)] -> Field_Gen FT - | _ -> Fail 1 "Field: not an equality">>) g + <:tactic< Match Context With [|-(eq ?1 ?2 ?3)] -> Field_Gen FT>>) g (* Verifies that all the terms have the same type and gives the right theory *) let guess_theory env evc = function |