@@ -180,10 +180,11 @@ declare Module BSkel Sort :- std.do! [
180180 log.coq.env.end-module-name ElpiOperationModName ElpiOperations,
181181 export.module ElpiOperationModName ElpiOperations,
182182
183- % we need to filter the wrappers out of ML
184- std.filter ML (x\ wrapper-mixin x _ _) WrapperML,
185183 % 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,
187188
188189 if-verbose (coq.say {header} "abbreviation factory-by-classname"),
189190
@@ -196,6 +197,11 @@ declare Module BSkel Sort :- std.do! [
196197% NewClauses => instance.saturate-instances,
197198].
198199
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+
199205/* ------------------------------------------------------------------------- */
200206/* ----------------------------- private code ------------------------------ */
201207/* ------------------------------------------------------------------------- */
@@ -703,7 +709,7 @@ lift-to-the-subject.aux [factory-on-subject-lifter Expr _ _|_] _ _ :-
703709% instance.declare-const (notably used in the API, i.e. in structures.v,
704710% HB.instance)
705711pred 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! [
707713
708714 % need the body of the wrapper projection type
709715 exported-op M _ C,
@@ -718,5 +724,11 @@ reexport-wrapper-as-instance M :- std.do! [
718724
719725 get-option "wrapper" ff => instance.declare-const Str B Arity _
720726 ].
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+
721733
722734}}
0 commit comments