diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-03-07 18:49:23 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-03-07 18:49:23 +0000 |
commit | c14f134c00cef3dbca8c4a66f9847094f3fd119c (patch) | |
tree | 8d30a07075934e758e21115d6b5b941e8c716bda /toplevel | |
parent | ba360bdefa2d7e4200c94a37c5065019718c2691 (diff) |
Fix treatment of remaining unification constraints: raise a more
informative exception if some constraints do not unify.
All calls except one used to raise a less informative exception when the
constraints weren't solved.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12849 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r-- | toplevel/command.ml | 6 | ||||
-rw-r--r-- | toplevel/record.ml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml index 75f0daa7f..51c7e50a4 100644 --- a/toplevel/command.ml +++ b/toplevel/command.ml @@ -256,9 +256,9 @@ let interp_mutual_inductive (paramsl,indl) notations finite = () in (* Instantiate evars and check all are resolved *) - let evd,_ = consider_remaining_unif_problems env_params !evdref in + let evd = consider_remaining_unif_problems env_params !evdref in let evd = Typeclasses.resolve_typeclasses ~onlyargs:false ~fail:true env_params evd in - let sigma = evd in + let sigma = evd in let constructors = List.map (fun (idl,cl,impsl) -> (idl,List.map (nf_evar sigma) cl,impsl)) constructors in let ctx_params = Sign.map_rel_context (nf_evar sigma) ctx_params in let arities = List.map (nf_evar sigma) arities in @@ -522,7 +522,7 @@ let interp_recursive isfix fixl notations = () in (* Instantiate evars and check all are resolved *) - let evd,_ = consider_remaining_unif_problems env_rec !evdref in + let evd = consider_remaining_unif_problems env_rec !evdref in let fixdefs = List.map (Option.map (nf_evar evd)) fixdefs in let fixtypes = List.map (nf_evar evd) fixtypes in let fixctxlength = List.map (fun (_,ctx) -> rel_context_nhyps ctx) fixctxs in diff --git a/toplevel/record.ml b/toplevel/record.ml index 0353261b9..c1c1a9671 100644 --- a/toplevel/record.ml +++ b/toplevel/record.ml @@ -68,7 +68,7 @@ let typecheck_params_and_fields id t ps nots fs = let env2,impls,newfs,data = interp_fields_evars evars env_ar nots (binders_of_decls fs) in - let evars,_ = Evarconv.consider_remaining_unif_problems env_ar !evars in + let evars = Evarconv.consider_remaining_unif_problems env_ar !evars in let evars = Typeclasses.resolve_typeclasses env_ar evars in let sigma = evars in let newps = Evarutil.nf_rel_context_evar sigma newps in |