Skip to content

Commit c6b44ee

Browse files
committed
fix factory-constructor
1 parent 1235eeb commit c6b44ee

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

HB/common/database.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ findall-factory-constructor L :-
236236
std.map {std.findall (findall-factory-constructor.aux _)} findall-factory-constructor.make L.
237237
pred findall-factory-constructor.aux o:prop.
238238
findall-factory-constructor.aux (factory-constructor F C) :-
239-
from F _ _, factory-constructor F C.
239+
is-factory F, factory-constructor F C.
240240
func findall-factory-constructor.make prop -> prop.
241241
findall-factory-constructor.make (findall-factory-constructor.aux P) P.
242242

HB/factory.elpi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ declare-mixin-or-factory MixinSrcClauses SectionCanonicalInstance
299299

300300
log.coq.env.begin-module "Exports" none,
301301
std.flatten [Clauses, GRDepsClauses, [
302+
is-factory (indt R),
302303
factory-constructor (indt R) GRK,
303304
factory-nparams (indt R) NParams,
304305
factory-builder-nparams BuildConst NParams,
@@ -373,7 +374,8 @@ declare-factory-alias MixinSrcClauses SectionCanonicalInstance
373374

374375
w-params.nparams MLwP NParams,
375376
std.flatten [ Clauses, GRDepsClauses,
376-
[ factory-nparams (const C) NParams,
377+
[ is-factory (const C),
378+
factory-nparams (const C) NParams,
377379
factory-constructor (const C) GRK,
378380
factory-builder-nparams BuildConst NParams,
379381
% gref-deps GRFSort MLwP,

HB/structures.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ func factory-nparams factoryname -> int.
149149
% [is-structure GR] tests if GR is a known structure
150150
pred is-structure o:gref.
151151

152+
% [is-factory GR] tests if GR is a known factory
153+
pred is-factory o:gref.
154+
152155
% [factory-builder-nparams Build N] states that when the user writes
153156
% the [F.Build T] abbreviation the term behind it has N arguments before T
154157
pred factory-builder-nparams o:constant, o:int.

0 commit comments

Comments
 (0)