-
Notifications
You must be signed in to change notification settings - Fork 365
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
Erased data and record types and modules #6294
Conversation
7993a7b
to
656eff9
Compare
The double-checker does not seem to care too much about erasure, so I don't plan to include any changes to it in this pull request. |
The pull request includes the following text in TODO: Explain how the reflection machinery interacts with run-time
irrelevance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great to me. Two small remarks:
- The double checker is maintained but is currently too liberal regarding modalities, this should be fixed but not as part of this PR.
- Regarding reflection, I recently added the ability to run erased macros (see Allow running of erased macros #5744). I'm not sure what else we should mention regarding the interaction between erasure and reflection.
The manual contains an incomplete explanation of when Agda switches between compile-time and run-time mode. Switches performed by the reflection machinery are omitted, and should be included. |
The field envModality was removed in favour of envRelevance and envQuantity, because (according to some comment) cohesion shouldn't be in the environment. The LensModality instance for TCEnv and the lens eModality were also removed. Furthermore the LensRelevance and LensQuantity instances for TCEnv were removed. Now every change of the environment's relevance component is performed using the lens eRelevance, and every change of the environment's quantity component is performed using eQuantity.
Furthermore applyQuantityToJudgementOnly was renamed to applyQuantityToJudgement and generalised.
When the hard compile-time mode is used all constants that are added to the signature are made erased. The hard compile-time mode is entered when an erased definition is checked, but not when a type-signature is checked. This is related to issue #6271: When an erased constructor is type-checked the hard compile-time mode is entered, and all associated definitions become erased.
See issue #4743.
I also addressed issue #6271: If a constructor is erased, then the corresponding generated definitions are also erased. However, I don't know if this is correct.
I have not modified the double-checker, and I don't know if that is necessary. (Is the double-checker still maintained?)