-
Notifications
You must be signed in to change notification settings - Fork 371
DISPLAY
pragmas should treat any defined name as matchable
#7533
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
Comments
I can reproduce the problem without generalized variables. The So in the pragma Minimized example: data Empty : Set where
postulate
F : Set → Set
X : Set
A : Set
{-# DISPLAY F Empty = X #-}
_ : F A
_ = {!!} -- ?0 : X |
Oh!? Wow... thanks for the pointer back to #2004 . Accordingly, I think I'll close this issue now, and re-raise an issue for |
This is indeed a duplicate of DISPLAY pragmas are still a prototypical feature and have not matured much since their introduction. |
The least that Agda should do here is to warn about unused pattern variables, i.e., variables bound on the lhs that are not used on the rhs. Rededicating this issue... |
We found out that we could use `erase` defined in terms of `trustMe` to prove UIP even with the `--without-K` option turned on. Turning things around and defining a stuck `erase` from which we can derive `trustMe` should be safer.
We seem to have an invalid DISPLAY pragma in our code base ourselves: b290d0b#r147631053
And the documentation sounds misleading: agda/doc/user-manual/language/pragmas.lagda.rst Lines 98 to 100 in 1e9725e
|
DISPLAY
pragma)?DISPLAY
pragmas
DISPLAY
pragmasDISPLAY
pragmas should treat any defined name as matchable
Agda version v2.7.0 (also v2.6.4.3, it seems)
stdlib version:
master
branchInteractive attempt to check the following MWE causes a weird error, which I don't even know how to localise as to cause (failure in the
variable
generalisation mechanism? in theDISPLAY
pragma?):Emacs interaction, instead of printing
?0 : Irrelevant A
prints?0 : ⊥
?NB
private
variables, then interaction is as expected.import
ofData.Empty
is excluded, and with it the{-# DISPLAY Irrelevant Empty = ⊥ #-}
pragma, then again the example is OK.Any ideas how to avoid this?
Data.Empty
has been stable in the stdlib for a while now, so it seems to be only the interaction with the explicit import ofData.Irrelevant
/Relation.Nullary.Recomputable
(or: irrelevance annotaions?) causing the bug?The text was updated successfully, but these errors were encountered: