Skip to content

Commit 94987ab

Browse files
committed
always define constants in HB.instance Definition _
1 parent d9a6b28 commit 94987ab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

structures.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,9 @@ main [const-decl Name (some BodySkel) TyWPSkel] :- !, std.do! [
354354
factory-alias->gref FactoryAlias Factory,
355355
std.assert! (factory-nparams Factory NParams) "Not a factory synthesized by HB",
356356
hack-section-discharging SectionBody SectionBodyHack,
357-
if (Name = "_")
358-
(TheFactory = SectionBodyHack)
359-
(hb-add-const Name SectionBodyHack _ @transparent! C,
360-
TheFactory = (global (const C))),
357+
if (Name = "_") (RealName is "HB_unnamed_factory_" ^ {std.any->string {new_int} }) (RealName = Name),
358+
hb-add-const RealName SectionBodyHack _ @transparent! C,
359+
TheFactory = (global (const C)),
361360
std.appendR {coq.mk-n-holes NParams} [TheType|_] Args,
362361
with-attributes (main-declare-instance TheType TheFactory Clauses),
363362

0 commit comments

Comments
 (0)