Skip to content

Commit

Permalink
Merge pull request #445 from math-comp/fix-new-elpi-compiler
Browse files Browse the repository at this point in the history
put factory-alias->gref in the database
  • Loading branch information
gares authored Sep 19, 2024
2 parents 449a797 + c066478 commit c6cb08d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions HB/common/database.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ extract-builder (builder-decl B) B.
pred leq-builder i:builder, i:builder.
leq-builder (builder N _ _ _) (builder M _ _ _) :- N =< M.

% [factory-alias->gref X GR] when X is already a factory X = GR
% however, when X is a phantom abbreviated gref, we find the underlying
% factory gref GR associated to it.
pred factory-alias->gref i:gref, o:gref.
factory-alias->gref PhGR GR :- phant-abbrev GR PhGR _, !.
factory-alias->gref GR GR :- phant-abbrev GR _ _, !.

pred sub-class? i:class, i:class.
sub-class? (class C1 _ ML1P) (class C2 _ ML2P) :-
not (C1 = C2),
Expand Down
7 changes: 7 additions & 0 deletions structures.v
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ pred from o:factoryname, o:mixinname, o:gref.
% Notation Abbrev t1 := (AbbrevCst t1 _ idfun).
pred phant-abbrev o:gref, o:gref, o:abbreviation.

% [factory-alias->gref X GR] when X is already a factory X = GR
% however, when X is a phantom abbreviated gref, we find the underlying
% factory gref GR associated to it.
pred factory-alias->gref i:gref, o:gref.
factory-alias->gref PhGR GR :- phant-abbrev GR PhGR _, !.
factory-alias->gref GR GR :- phant-abbrev GR _ _, !.

%%%%% Cache of known facts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% [factory-constructor F K] means K is a constructor for
Expand Down

0 comments on commit c6cb08d

Please sign in to comment.