Skip to content

Conversation

@gares
Copy link
Member

@gares gares commented Dec 1, 2023

Since Coq 8.18 the parsing (synterp) phase of commands must be separate from the execution one (interp).
The synterp phase must declare operations on module and section (and notations, be we don't have them).

Only Coq-Elpi 2.0 has (will have) support for this feature. See LPCIC/coq-elpi#557

This PR fixes HB when used with Vscoq2.
This PR removes the code of HB.lock and rebinds elpi.apps.locker(mlock) to that name.

@CohenCyril
Copy link
Member

CohenCyril commented Dec 1, 2023

I think the removal of HB.lock will break mathcomp. Maybe we could make a deprecated alias to mlock

@gares
Copy link
Member Author

gares commented Dec 1, 2023

Ok

% is this a bug?
% coq.env.current-library File,
% coq.elpi.accumulate current "export.db" (clause _ _ (module-to-export File "" O)).
true.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CohenCyril is this a bug in HB.structure?
The module MathCompCompatFoo is exported here, but not when one issues HB.reexport.
Is this intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snippet is outdated, but the question still valid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a bug indeed, I think it should be marked to be exported via HB.reexport

@gares gares force-pushed the coq-elpi-2 branch 4 times, most recently from 7ed9b59 to e961027 Compare December 5, 2023 13:03
@gares gares force-pushed the coq-elpi-2 branch 2 times, most recently from 8a5c6bb to 3278574 Compare December 5, 2023 13:18
@gares gares marked this pull request as ready for review December 5, 2023 13:19
@gares
Copy link
Member Author

gares commented Dec 5, 2023

I think this PR is ready now, although still blocked by the release of coq-elpi 2.0.
And the coq-master job also needs an update to the coq-master branch in Coq-Elpi which happens after the release.

I'm dropping 8.17 support. The only problem is that now the two phases need to be in sync, and we do generate random module names. Coq-Elpi 2 has a commodity API which lets one randomize the name at synterp time, and just reuse the same name at interp time.
This choice is debatable, but at the same this PR should be 100% backward compatible. I mean, on 8.17 we can use the last release of HB. This compatibility drop is only annoying if we add to HB new features and use them in MC.

@SkySkimmer
Copy link
Contributor

Please merge now

@gares gares merged commit 5978ba7 into master Dec 29, 2023
@gares gares deleted the coq-elpi-2 branch December 29, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants