123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)openPpopenNamesopenTactypes(** Printing of [intro_pattern] *)letrecpr_intro_patternprc{CAst.v=pat}=matchpatwith|IntroForthcomingtrue->str"*"|IntroForthcomingfalse->str"**"|IntroNamingp->pr_intro_pattern_namingp|IntroActionp->pr_intro_pattern_actionprcpandpr_intro_pattern_naming=letopenNamegeninfunction|IntroIdentifierid->Id.printid|IntroFreshid->str"?"++Id.printid|IntroAnonymous->str"?"andpr_intro_pattern_actionprc=function|IntroWildcard->str"_"|IntroOrAndPatternpll->pr_or_and_intro_patternprcpll|IntroInjectionpl->str"[="++hv0(prlist_with_sepspc(pr_intro_patternprc)pl)++str"]"|IntroApplyOn({CAst.v=c},pat)->pr_intro_patternprcpat++str"%"++prcc|IntroRewritetrue->str"->"|IntroRewritefalse->str"<-"andpr_or_and_intro_patternprc=function|IntroAndPatternpl->str"("++hv0(prlist_with_seppr_comma(pr_intro_patternprc)pl)++str")"|IntroOrPatternpll->str"["++hv0(prlist_with_seppr_bar(prlist_with_sepspc(pr_intro_patternprc))pll)++str"]"(** Printing of bindings *)letpr_bindingprc=letopenCAstinfunction|{loc;v=(NamedHypid,c)}->hov1(Names.Id.printid.v++str" :="++spc()++prcc)|{loc;v=(AnonHypn,c)}->hov1(intn++str" :="++spc()++prcc)letpr_bindingsprcprlc=function|ImplicitBindingsl->brk(1,1)++str"with"++brk(1,1)++pr_sequenceprcl|ExplicitBindingsl->brk(1,1)++str"with"++brk(1,1)++pr_sequence(funb->str"("++pr_bindingprlcb++str")")l|NoBindings->mt()letpr_bindings_no_withprcprlc=function|ImplicitBindingsl->brk(0,1)++prlist_with_sepspcprcl|ExplicitBindingsl->brk(0,1)++prlist_with_sepspc(funb->str"("++pr_bindingprlcb++str")")l|NoBindings->mt()letpr_with_bindingsprcprlc(c,bl)=hov1(prcc++pr_bindingsprcprlcbl)