-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #5809: retain parameters for irrelevant projections.
Since irrelevant projections are not reduced since Agda 2.6.1, they can lead to non-inferable terms if they drop their parameters. A simple solution (implemented here) is to retain parameters for all irrelevant projection, treating them as ordinary functions on the rhs.
- Loading branch information
1 parent
178d701
commit ffac8d3
Showing
12 changed files
with
99 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- Andreas, 2022-03-07, issue #5809 reported by jamestmartin | ||
-- Regression in Agda 2.6.1. | ||
-- Not reducing irrelevant projections lead to non-inferable elim-terms | ||
-- and consequently to internal errors. | ||
-- | ||
-- The fix is to treat irrelevant projections as just functions, | ||
-- retaining their parameters, so that they remain inferable | ||
-- even if not in normal form. | ||
|
||
{-# OPTIONS --irrelevant-projections #-} | ||
{-# OPTIONS --allow-unsolved-metas #-} | ||
|
||
-- {-# OPTIONS --no-double-check #-} | ||
-- {-# OPTIONS -v impossible:100 #-} | ||
-- {-# OPTIONS -v tc:40 #-} | ||
|
||
open import Agda.Builtin.Equality | ||
|
||
record Squash {ℓ} (A : Set ℓ) : Set ℓ where | ||
constructor squash | ||
field | ||
.unsquash : A | ||
open Squash | ||
|
||
.test : ∀ {ℓ} {A : Set ℓ} (x : A) (y : Squash A) → {!!} | ||
test x y = {!!} | ||
where | ||
help : unsquash (squash x) ≡ unsquash y | ||
help = refl | ||
|
||
-- WAS: internal error. | ||
-- Should succeed with unsolved metas. |