@@ -180,10 +180,11 @@ declare Module BSkel Sort :- std.do! [
180
180
log.coq.env.end-module-name ElpiOperationModName ElpiOperations,
181
181
export.module ElpiOperationModName ElpiOperations,
182
182
183
- % we need to filter the wrappers out of ML
184
- std.filter ML (x\ wrapper-mixin x _ _) WrapperML,
185
183
% we need to assert locally the clauses in EX
186
- EX => std.forall WrapperML private.reexport-wrapper-as-instance,
184
+ EX => std.forall ML private.reexport-wrapper-as-instance,
185
+
186
+ %hack
187
+ hack,
187
188
188
189
if-verbose (coq.say {header} "abbreviation factory-by-classname"),
189
190
@@ -196,6 +197,11 @@ declare Module BSkel Sort :- std.do! [
196
197
% NewClauses => instance.saturate-instances,
197
198
].
198
199
200
+ pred hack.
201
+ hack :- coq.next-synterp-action (begin-section X), coq.env.begin-section X, hack.
202
+ hack :- coq.next-synterp-action end-section, coq.env.end-section, hack.
203
+ hack.
204
+
199
205
/* ------------------------------------------------------------------------- */
200
206
/* ----------------------------- private code ------------------------------ */
201
207
/* ------------------------------------------------------------------------- */
@@ -703,7 +709,7 @@ lift-to-the-subject.aux [factory-on-subject-lifter Expr _ _|_] _ _ :-
703
709
% instance.declare-const (notably used in the API, i.e. in structures.v,
704
710
% HB.instance)
705
711
pred reexport-wrapper-as-instance i:mixinname.
706
- reexport-wrapper-as-instance M :- std.do! [
712
+ reexport-wrapper-as-instance M :- wrapper-mixin M _ _, !, std.do! [
707
713
708
714
% need the body of the wrapper projection type
709
715
exported-op M _ C,
@@ -718,5 +724,11 @@ reexport-wrapper-as-instance M :- std.do! [
718
724
719
725
get-option "wrapper" ff => instance.declare-const Str B Arity _
720
726
].
727
+ reexport-wrapper-as-instance _ :-
728
+ std.assert! (coq.next-synterp-action (begin-section SectionName)) "synterp code did not open section",
729
+ coq.env.begin-section SectionName,
730
+ std.assert! (coq.next-synterp-action (end-section)) "synterp code did not close section",
731
+ coq.env.end-section.
732
+
721
733
722
734
}}
0 commit comments