with NCicLibrary.ObjectNotFound _ -> R.string_of_reference r
;;
+let string_of_implicit_annotation = function
+ | `Closed -> "▪"
+ | `Type -> ""
+ | `Hole -> "□"
+ | `Term -> "Term"
+ | `Typeof x -> "Ty("^string_of_int x^")"
+;;
+
let ppterm ~context ~subst ~metasenv:_ ?(inside_fix=false) t =
let buff = Buffer.create 100 in
let f = Format.formatter_of_buffer buff in
List.iter (fun x -> F.fprintf f "@;";aux ctx x) (List.tl l);
if not toplevel then F.fprintf f ")";
F.fprintf f "@]"
- | C.Implicit _ -> F.fprintf f "?"
+ | C.Implicit annot ->
+ F.fprintf f "?%s" (string_of_implicit_annotation annot)
| C.Meta (n,lc) when List.mem_assoc n subst ->
let _,_,t,_ = List.assoc n subst in
aux ctx (NCicSubstitution.subst_meta lc t)
let rec ppmetasenv ~subst metasenv = function
| [] -> ""
| (i,(name, ctx, ty)) :: tl ->
- let name = match name with Some n -> "("^n^")" | _ -> "" in
+ let name = match name with Some n -> "(\""^n^"\")" | _ -> "" in
ppcontext ~sep:"; " ~subst ~metasenv ctx ^
" ⊢ ?"^string_of_int i^name^" : " ^
ppterm ~metasenv ~subst ~context:ctx ty ^ "\n" ^