Skip to content

Commit 635cc47

Browse files
committed
option wrapper=off to instance
1 parent 336ee12 commit 635cc47

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

HB/instance.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ declare-const Name BodySkel TyWPSkel CSL :- std.do! [
8888
% derived instance %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8989
(private.declare-regular-inst TheType ML TheMixins TyWP SectionName CSL)
9090
% regular instance %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91-
(if (not(private.is-structure-op-w-wrapper TheType))
91+
(if (get-option "wrapper" ff ; not(private.is-structure-op-w-wrapper TheType))
9292
% regular subject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9393
(private.declare-regular-inst TheType ML TheMixins TyWP SectionName CSL)
9494
% wrapper %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tests/enriched_cat_case6.v

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,9 @@ HB.structure
130130
Definition IMon_enriched_quiver :=
131131
{ Obj of Mon_enriched_quiver Obj & IAlg_enriched_quiver Obj }.
132132

133-
(* workaround *)
134-
Definition Ifoo (T : IMon_enriched_quiver.type) (A B : T) : IMon.type.
135-
Proof.
136-
refine (HB.pack (hom A B)).
137-
Defined.
138-
Canonical Ifoo.
133+
#[wrapper=false]
134+
HB.instance Definition _ (T : IMon_enriched_quiver.type) A B : isMon (@hom T A B) :=
135+
Mon.on (@hom T A B).
139136

140137
(****)
141138

@@ -144,13 +141,10 @@ HB.structure
144141
Definition CMon_enriched_quiver :=
145142
{ Obj of Mon_enriched_quiver Obj & CAlg_enriched_quiver Obj }.
146143

147-
(* workaround *)
148-
Definition Cfoo (T : CMon_enriched_quiver.type) (A B : T) : CMon.type.
149-
Proof.
150-
refine (HB.pack (hom A B)).
151-
Defined.
152-
Canonical Cfoo.
153144

145+
#[wrapper=false]
146+
HB.instance Definition _ (T : CMon_enriched_quiver.type) A B :=
147+
Mon.on (@hom T A B).
154148

155149
(* { Obj of isQuiver Obj & hom_isMon Obj & hom_isIAlg Obj }. *)
156150

0 commit comments

Comments
 (0)