Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Require PrimInt63 and PrimFloat by default #579

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

proux01
Copy link
Contributor

@proux01 proux01 commented Jan 26, 2024

Some users are complaining that loading elpi loads part of the stdlib with many axioms even if they are not using them.
This PR tries to improve on that point.

@@ -84,11 +93,11 @@ GRAMMAR EXTEND Gram

term: LEVEL "0"
[ [ "lib"; ":"; id = qualified_name -> {
let ref = Coqlib.lib_ref (String.concat "." (snd id)) in
let ref = lib_ref id in
let path = Nametab.path_of_global ref in
Copy link
Collaborator

Choose a reason for hiding this comment

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

not really related to this PR but looking up lib_ref and nametab during parsing is pretty bad with parsing/execution separated

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed...

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this is really tricky. I do extend the Coq grammar, so there is a bug, but we only use it inside elpi code, hence inside a quotation. The text between {{ ... }} is parsed as a string, and the Coq parser is called at run time. So I think it is mostly fine for the use we make.

Anyway, lib: predates the ability of elpi to compile units, we don't need that anymore. So maybe it is just better to wipe it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe should we deprecate it first? In any case, that should probably happen in another PR.

@proux01
Copy link
Contributor Author

proux01 commented Jan 28, 2024

@gares CI green

@gares gares merged commit 1ed6c4e into LPCIC:master Jan 29, 2024
33 checks passed
@proux01 proux01 deleted the no_primitive branch January 29, 2024 10:00
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.

3 participants