File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,31 @@ under.do! Then LP :- Then (_\ std.do! LP) _.
8282
8383%%%%% HB Utils %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8484
85+
86+ % HACK: move to coq-elpi proper
87+ type attmap attribute-type.
88+
8589% runs P in a context where Coq #[attributes] are parsed
8690pred with-attributes i:prop.
8791with-attributes P :-
8892 attributes A,
93+ % HACK: move to coq-elpi proper
94+ (pi S L AS Prefix R R1 Map PS\
95+ parse-attributes.aux [attribute S (node L)|AS] Prefix R :-
96+ if (Prefix = "") (PS = S) (PS is Prefix ^ "." ^ S), supported-attribute (att PS attmap), !,
97+ parse-attributes.aux AS Prefix R1,
98+ (pi x\ supported-attribute (att x string) :- !) => parse-attributes.aux L "" Map,
99+ std.append R1 [get-option PS Map] R
100+ ) =>
89101 coq.parse-attributes A [
90102 att "verbose" bool,
91103 att "mathcomp" bool,
92104 att "mathcomp.axiom" string,
105+ att "infer" attmap,
93106 ] Opts, !,
94107 Opts => P.
95108
109+
96110pred if-verbose i:prop.
97111if-verbose P :- get-option "verbose" tt, !, P.
98112if-verbose _.
You can’t perform that action at this time.
0 commit comments