aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-04-10 16:07:52 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-04-10 16:07:52 +0000
commit9b8e006e0c84408992f42bd9d713eacf2936a6d3 (patch)
tree890f9572f385abe4dd80506ee2bb0c0ac81392b9 /toplevel
parentd69ce3d0733a7e306514734a2b56d7e112f84f1d (diff)
Amélioration des messages d'erreurs concernant l'inférence des implicites
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2630 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/himsg.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml
index 2d93c6fd3..4041d311c 100644
--- a/toplevel/himsg.ml
+++ b/toplevel/himsg.ml
@@ -95,10 +95,14 @@ let explain_elim_arity ctx ind aritylst c pj okinds =
let explain_case_not_inductive ctx cj =
let pc = prterm_env ctx cj.uj_val in
let pct = prterm_env ctx cj.uj_type in
- str "In Cases expression, the matched term" ++ brk(1,1) ++ pc ++ spc () ++
- str "has type" ++ brk(1,1) ++ pct ++ spc () ++
- str "which is not a (co-)inductive type"
-
+ match kind_of_term cj.uj_type with
+ | Evar _ ->
+ str "Cannot infer a type for this expression"
+ | _ ->
+ str "This term" ++ brk(1,1) ++ pc ++ spc () ++
+ str "has type" ++ brk(1,1) ++ pct ++ spc () ++
+ str "which is not a (co-)inductive type"
+
let explain_number_branches ctx cj expn =
let pc = prterm_env ctx cj.uj_val in
let pct = prterm_env ctx cj.uj_type in