@@ -193,9 +193,8 @@ pred mixin-class o:mixinname, o:classname.
193193% Coq's CS database (which is just for structures).
194194pred mixin-src o:term, o:mixinname, o:term.
195195
196- % [has-mixin-instance P M G] states that G is a reference to an instance
197- % which can be used to reconstruct an instance
198- % of the form [M P …] with eventually some parameters for P.
196+ % [has-mixin-instance K M G] states that G is a reference to an instance
197+ % of mixin M for subject K
199198pred has-mixin-instance o:cs-pattern, o:mixinname, o:gref.
200199
201200%% database for HB.builders %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -690,7 +689,8 @@ Elpi Export HB.structure.
690689(* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
691690(* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *)
692691
693- (* [HB.saturate] saturates all instances w.r.t. the current hierarchy.
692+ (* [HB.saturate [key]] saturates all instances (of all known keys, if key is not
693+ given) w.r.t. the current hierarchy.
694694
695695 When two (unrelated) files are imported it might be that the instances
696696 declared in one file are sufficient to instantiate structures declared
@@ -715,8 +715,11 @@ Elpi Accumulate File "HB/instance.elpi".
715715Elpi Accumulate File "HB/context.elpi".
716716Elpi Accumulate File "HB/factory.elpi".
717717Elpi Accumulate lp:{{
718- main [] :- !, with -attributes (with -logging (instance.saturate-instances)).
719- main _ :- coq.error "Usage: HB.saturate".
718+ main [] :- !, with -attributes (with -logging (instance.saturate-instances _)).
719+ main [str "Type "] :- !, with -attributes (with -logging (instance.saturate-instances (cs-sort _))).
720+ main [str K] :- !, coq.locate K GR, with -attributes (with -logging (instance.saturate-instances (cs-gref GR))).
721+ main [trm T] :- !, term->cs-pattern T P, with -attributes (with -logging (instance.saturate-instances P)).
722+ main _ :- coq.error "Usage: HB.saturate [key]".
720723}}.
721724Elpi Typecheck.
722725Elpi Export HB.saturate.
0 commit comments