aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin1999-11-10 19:08:32 +0000
committerherbelin1999-11-10 19:08:32 +0000
commitd710bf029a02df58762f6a37d517c3178f8cbeb7 (patch)
treeb3fc635fcfe924ef927484ebaddc97078b30b02a
parentc94b335ed41a483026a1c5d45b2d8acb870e4f90 (diff)
On se fait la main: plus de precision si ill-formed rec body
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@119 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--toplevel/himsg.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml
index ea440788b6..d39d347282 100644
--- a/toplevel/himsg.ml
+++ b/toplevel/himsg.ml
@@ -169,9 +169,12 @@ let explain_cant_apply k ctx s rator randl =
(* (co)fixpoints *)
let explain_ill_formed_rec_body k ctx str lna i vdefs =
let pvd = P.pr_term k ctx vdefs.(i) in
+ let s =
+ match List.nth lna i with Name id -> string_of_id id | Anonymous -> "_" in
[< str; 'fNL; 'sTR"The ";
if Array.length vdefs = 1 then [<>] else [<'iNT (i+1); 'sTR "-th ">];
- 'sTR"recursive definition"; 'sPC ; pvd; 'sPC;
+ 'sTR"recursive definition"; 'sPC; 'sTR s;
+ 'sPC ; 'sTR":="; 'sPC ; pvd; 'sPC;
'sTR "is not well-formed" >]
let explain_ill_typed_rec_body k ctx i lna vdefj vargs =