X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_kernel%2FnCic.ml;h=7e4e4f85535dfd76beb667fa2bc475325a699438;hb=8f694a82e3291e4a3c2a4f805782846204cf348c;hp=4490ee0485c218a4b7681d5c3c0048c45198abd9;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/ng_kernel/nCic.ml b/matita/components/ng_kernel/nCic.ml index 4490ee048..7e4e4f855 100644 --- a/matita/components/ng_kernel/nCic.ml +++ b/matita/components/ng_kernel/nCic.ml @@ -87,7 +87,7 @@ type inductiveType = (* relevance, typename, arity, constructors *) type def_flavour = (* presentational *) - [ `Definition | `Fact | `Lemma | `Theorem | `Corollary | `Example ] + [ `Axiom | `Definition | `Fact | `Lemma | `Theorem | `Corollary | `Example ] type def_pragma = (* pragmatic of the object *) [ `Coercion of int @@ -119,3 +119,38 @@ type obj_kind = (* the int must be 0 if the object has no body *) type obj = NUri.uri * int * metasenv * substitution * obj_kind + +(* pretty-printing *) +class virtual status = + object + method virtual ppterm: context:context -> subst:substitution -> + metasenv:metasenv -> ?margin:int -> ?inside_fix:bool -> term -> string + + method virtual ppcontext: ?sep:string -> subst:substitution -> + metasenv:metasenv -> context -> string + + method virtual ppmetasenv: subst:substitution -> metasenv -> string + + method virtual ppsubst: metasenv:metasenv -> ?use_subst:bool -> substitution -> string + + method virtual ppobj: obj -> string + end + +(* pretty-printing: same as vstatus, but all methods are concrete *) +(* used only to declare concrete instances of subclasses of vstatus class *) +class type cstatus = + object + inherit status + + method ppterm: context:context -> subst:substitution -> + metasenv:metasenv -> ?margin:int -> ?inside_fix:bool -> term -> string + + method ppcontext: ?sep:string -> subst:substitution -> + metasenv:metasenv -> context -> string + + method ppmetasenv: subst:substitution -> metasenv -> string + + method ppsubst: metasenv:metasenv -> ?use_subst:bool -> substitution -> string + + method ppobj: obj -> string + end