]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nCicPp.ml
more push/pop to avoid confusion with imperative data structures employed by
[helm.git] / helm / software / components / ng_kernel / nCicPp.ml
index 449c4313bb2673781be828c83a797f76779a75ac..00ea9f24e32e5a79b2a71877d6361c9e13cd9a49 100644 (file)
@@ -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;;
@@ -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"^