Skip to content

Commit 6daaf2b

Browse files
committed
remove ELIM hack
1 parent 33dfcef commit 6daaf2b

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

HB/instance.elpi

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,13 @@ declare-const Name BodySkel TyWPSkel CSL :- std.do! [
8484
% derive all mixins the factory provides
8585
private.declare-mixins-from-factory Factory TheType TheFactory ML TheMixins,
8686

87-
if (rex.match ".*__ELIM" RealName)
88-
% derived instance %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89-
(private.declare-regular-inst TheType ML TheMixins TyWP SectionName CSL)
90-
% regular instance %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91-
(if (get-option "wrapper" ff ; not(is-structure-op-w-wrapper TheType _ _))
92-
% regular subject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
93-
(private.declare-regular-inst TheType ML TheMixins TyWP SectionName CSL)
94-
% wrapper %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95-
(private.declare-wrapper-inst TheType ML TheMixins TyWP SectionName CSL)
96-
),
87+
% regular instance %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88+
if (get-option "wrapper" ff ; not(is-structure-op-w-wrapper TheType _ _))
89+
% regular subject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90+
(private.declare-regular-inst TheType ML TheMixins TyWP SectionName CSL)
91+
% wrapper %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92+
(private.declare-wrapper-inst TheType ML TheMixins TyWP SectionName CSL)
93+
,
9794

9895
% shared to all branches
9996
if (get-option "export" tt)

HB/structure.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ reexport-wrapper-as-instance M :- std.do! [
742742
Str0 is "Op_isMx" ^ "__" ^ {std.any->string {new_int}},
743743
std.string.concat "__" [Str0, "ELIM"] Str,
744744

745-
instance.declare-const Str B Arity _
745+
get-option "wrapper" ff => instance.declare-const Str B Arity _
746746
].
747747

748748
}}

0 commit comments

Comments
 (0)