Skip to content

Conversation

@CohenCyril
Copy link
Member

@CohenCyril CohenCyril commented Mar 5, 2021

This is not a fix for #182. But it still makes sense

@CohenCyril CohenCyril force-pushed the no_section_discharge_for_factory_aliases branch from b4eaea1 to d0cb16c Compare March 5, 2021 19:51
@CohenCyril CohenCyril changed the title No section discharge for alias factories No section discharge for alias factories and builder mixins Mar 5, 2021
@CohenCyril CohenCyril force-pushed the no_section_discharge_for_factory_aliases branch 2 times, most recently from f25c189 to ebe00df Compare March 5, 2021 19:57
@gares
Copy link
Member

gares commented Mar 5, 2021

Attributes are only looked up in the hypothetical context, not the whole program. Your intuition is nice, but I don't think I can implement it :-/

@CohenCyril
Copy link
Member Author

CohenCyril commented Mar 5, 2021

Attributes are only looked up in the hypothetical context, not the whole program. Your intuition is nice, but I don't think I can implement it :-/

It's ok I invented a new clause dedicated to that... My main problem is understanding how to work around rocq-prover/rocq#13903, but «c'est casse-gueule».

@gares
Copy link
Member

gares commented Mar 5, 2021

Something is fishy, vars should be closed wrt their type.

@gares
Copy link
Member

gares commented Mar 5, 2021

You could use the code I wrote to discharge by hand record factories, a part of it actually...

@CohenCyril
Copy link
Member Author

CohenCyril commented Mar 5, 2021

You could use the code I wrote to discharge by hand record factories, a part of it actually...

Actually, your trick for factories relied on the fact that the factory was not used in the section it was defined in. So that you can close the section and rebuild the record after that. However we cannot do this for builder instances because they are gradually used in the same section.
Moreover for factories the section environement was totally under our control, but in a builders section the user may add a new Variable for some reason and we do not want to use those. Rather than writing an additional mechanism to detect these user interference and warn/error, I think it would be better to close the using transitively, and use @using! _ =>.

@gares
Copy link
Member

gares commented Mar 5, 2021

I can maybe fix @using! In coq Elpi waiting for the fix in coq proper... But next week :-)

@CohenCyril
Copy link
Member Author

CohenCyril commented Mar 5, 2021

@gares @proux01 I opened an issue #182 with a minimized counterexample for the time being.

@gares
Copy link
Member

gares commented Mar 25, 2021

What should we do with this PR? The coq issue is closed (in 8.14) and HB.instance K V deprecated.

@gares gares added this to the 1.1.0 milestone Mar 25, 2021
@gares gares force-pushed the no_section_discharge_for_factory_aliases branch from c0ab571 to 6a971c5 Compare March 29, 2021 14:21
@gares
Copy link
Member

gares commented Mar 29, 2021

@CohenCyril it may be nice to have a test for this feature in the test suite, can you add it?

@gares gares merged commit 7516a95 into master Mar 30, 2021
@gares gares deleted the no_section_discharge_for_factory_aliases branch March 30, 2021 13:13
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