Skip to content

Commit

Permalink
make copy-pack-holes failsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Jul 3, 2024
1 parent 8a72aef commit 9cdfb45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HB/common/utils.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ build-list-w-params [] TheType Factories (w-params.nil Name TT1 R) :- std.do! [
pred copy-pack-holes i:term, i:term, i:term, o:term.
copy-pack-holes TheType NewType Term Out :- std.do! [
(pi Args NewArgs CSInstance ParamsRev ParamsRevCopy Pack \
(copy (app[global Pack | Args]) (app[global Pack | NewArgs]) :- pack? Pack _, !,
std.rev Args [CSInstance,TheType|ParamsRev],
(copy (app[global Pack | Args]) (app[global Pack | NewArgs]) :- pack? Pack _,
std.rev Args [CSInstance,TheType|ParamsRev], !,
std.map ParamsRev copy ParamsRevCopy,
std.rev [{{ lib:elpi.hole }},NewType|ParamsRevCopy] NewArgs)) =>
copy Term Out,
Expand Down

0 comments on commit 9cdfb45

Please sign in to comment.