X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicPp.ml;h=00ea9f24e32e5a79b2a71877d6361c9e13cd9a49;hb=01001c883a8151edba81cd03a6f254d24a81c867;hp=8ae842868301e4172fc2d22e1936fa1ed8f494bf;hpb=e2381427bca733bd36a099002fa8b7140f7a20d0;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicPp.ml b/helm/software/components/ng_kernel/nCicPp.ml index 8ae842868..00ea9f24e 100644 --- a/helm/software/components/ng_kernel/nCicPp.ml +++ b/helm/software/components/ng_kernel/nCicPp.ml @@ -12,7 +12,8 @@ (* $Id$ *) let ppterm = - ref (fun ~context ~subst ~metasenv ?inside_fix t -> "Please, set a pp callback") + ref (fun ~context:_ ~subst:_ ~metasenv:_ ?inside_fix _ -> + ignore (inside_fix) ; "Please, set a pp callback") ;; let set_ppterm f = ppterm := f;; @@ -27,12 +28,12 @@ module R = NReference let r2s pp_fix_name r = try match r with - | R.Ref (u,R.Ind (_,i)) -> + | R.Ref (u,R.Ind (_,i,_)) -> (match NCicLibrary.get_obj u with | _,_,_,_, C.Inductive (_,_,itl,_) -> let _,name,_,_ = List.nth itl i in name | _ -> assert false) - | R.Ref (u,R.Con (i,j)) -> + | R.Ref (u,R.Con (i,j,_)) -> (match NCicLibrary.get_obj u with | _,_,_,_, C.Inductive (_,_,itl,_) -> let _,_,_,cl = List.nth itl i in @@ -50,10 +51,10 @@ let r2s pp_fix_name r = else NUri.name_of_uri u ^"("^ string_of_int i ^ ")" | _ -> assert false) - with exn -> R.string_of_reference r + with NCicLibrary.ObjectNotFound _ -> R.string_of_reference r ;; -let trivial_pp_term ~context ~subst ~metasenv ?(inside_fix=false) t = +let trivial_pp_term ~context ~subst:_ ~metasenv:_ ?(inside_fix=false) t = let buff = Buffer.create 100 in let f = Format.formatter_of_buffer buff in let module F = Format in @@ -133,7 +134,6 @@ let trivial_pp_term ~context ~subst ~metasenv ?(inside_fix=false) t = | C.Implicit _ -> F.fprintf f "?" | C.Meta (n,_) -> F.fprintf f "?%d" n | C.Sort C.Prop -> F.fprintf f "Prop" - | C.Sort C.CProp -> F.fprintf f "CProp" | C.Sort (C.Type []) -> F.fprintf f "IllFormedUniverse" | C.Sort (C.Type [false, u]) -> F.fprintf f "%s" (NUri.name_of_uri u) | C.Sort (C.Type [true, u]) -> F.fprintf f "S(%s)" (NUri.name_of_uri u) @@ -160,7 +160,7 @@ let ppobj = function ppterm ~metasenv ~subst ~context:[] ~inside_fix:true bo) fl) | (u,_,metasenv,subst,NCic.Inductive (b, leftno,tyl, _)) -> "{"^NUri.string_of_uri u^"} with "^string_of_int leftno^" fixed params\n"^ - "inductive "^ + (if b then "inductive " else "coinductive ")^ String.concat "\nand " (List.map (fun (_,name,ty,cl) -> name^": "^ppterm ~metasenv ~subst ~context:[] ty^ " :=\n"^