@@ -599,6 +599,33 @@ Elpi Typecheck.
599599(* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
600600(* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
601601
602+ (** [HB.check T] acts like [Check T] but supports the attribute [#[skip="rex"]]
603+ that skips the action on Coq version matches rex *)
604+
605+ Elpi Command HB.check.
606+ Elpi Accumulate Db hb.db.
607+ Elpi Accumulate File "HB/common/stdpp.elpi".
608+ Elpi Accumulate File "HB/common/utils.elpi".
609+ Elpi Accumulate File "HB/common/log.elpi".
610+ Elpi Accumulate lp:{{
611+ main [trm Skel] :- !, with -attributes (with -logging (check-or-not Skel)).
612+ main _ :- coq.error "usage: HB.check (term).".
613+
614+ pred check-or-not i:term.
615+ check-or-not Skel :-
616+ coq.version VersionString _ _ _,
617+ if (get-option "skip" R, rex_match R VersionString)
618+ (coq.warn "Skipping test on Coq" VersionString "as requested")
619+ (log.coq.check Skel Ty T,
620+ coq.say {coq.term->string T} ":" {coq.term->string Ty}).
621+ }}.
622+ Elpi Typecheck.
623+ Elpi Export HB.check.
624+
625+ (* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
626+ (* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
627+ (* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
628+
602629(** Technical notations from /Canonical Structures for the working Coq user/ *)
603630Notation "`Error_cannot_unify: t1 'with ' t2" := (unify t1 t2 None)
604631 (at level 0, format "`Error_cannot_unify: t1 'with' t2", only printing) :
0 commit comments