From: Claudio Sacerdoti Coen Date: Thu, 14 Sep 2006 10:23:29 +0000 (+0000) Subject: Bug fixed in pretty printing in new syntax of MutCases on inductive types X-Git-Tag: 0.4.95@7852~1035 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=56117fb4613ccd685861ca762954169c059467c8;p=helm.git Bug fixed in pretty printing in new syntax of MutCases on inductive types with left parameters. --- diff --git a/components/cic_proof_checking/cicPp.ml b/components/cic_proof_checking/cicPp.ml index 136e9ddae..f3560cc3a 100644 --- a/components/cic_proof_checking/cicPp.ml +++ b/components/cic_proof_checking/cicPp.ml @@ -139,18 +139,20 @@ let rec pp t l = | C.MutCase (uri,n1,ty,te,patterns) -> let connames_and_argsno = (match fst(CicEnvironment.get_obj CicUniv.empty_ugraph uri) with - C.InductiveDefinition (dl,_,_,_) -> + C.InductiveDefinition (dl,_,paramsno,_) -> let (_,_,_,cons) = get_nth dl (n1+1) in List.map (fun id,ty -> (* this is just an approximation since we do not have reduction yet! *) - let rec count_prods = + let rec count_prods toskip = function - C.Prod (_,_,bo) -> 1 + count_prods bo + C.Prod (_,_,bo) when toskip > 0 -> + count_prods (toskip - 1) bo + | C.Prod (_,_,bo) -> 1 + count_prods 0 bo | _ -> 0 in - id, count_prods ty + id, count_prods paramsno ty ) cons | _ -> raise CicPpInternalError )