-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recompute blocker in equalSort (#7039)
Issue #7034 presents a case where a blocking meta gets solved by pruning, so we need to update blockers we are passing around when there is a chance that they got stale. Fixes #7034.
- Loading branch information
1 parent
fe43379
commit ea16c4c
Showing
5 changed files
with
68 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- Andreas, 2023-12-21, another test for #7034 by Christian Sattler | ||
|
||
{-# OPTIONS --two-level --rewriting --confluence-check #-} | ||
|
||
module Issue7034-2 where | ||
|
||
open import Agda.Primitive using (SSet) | ||
|
||
postulate | ||
X : SSet | ||
x : X | ||
Eq : X → X → SSet | ||
|
||
{-# BUILTIN REWRITE Eq #-} | ||
|
||
module _ (B : SSet) where | ||
record R : SSet where | ||
field | ||
b : B | ||
g : B → X | ||
|
||
postulate | ||
r : R | ||
open R r | ||
|
||
postulate | ||
rule : Eq (g b) x | ||
|
||
{-# REWRITE rule #-} |
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,24 @@ | ||
-- Andreas, 2023-12-21, issue #7034 reported and testcase by Christian Sattler | ||
-- | ||
-- A meta that was designated as blocker for a constraint gets instantiated by pruning here. | ||
-- Solved by recomputing the blocker just in time. | ||
|
||
{-# OPTIONS --two-level #-} | ||
|
||
module Issue7034 where | ||
|
||
open import Agda.Primitive using (SSet) | ||
|
||
postulate | ||
A : SSet | ||
x : A | ||
|
||
foo : {!(y : A) → ?!} -- give "(y : A) → ?" here | ||
foo = x | ||
|
||
-- WAS: internal error: an instantiated meta used as blocker for a constraint. | ||
|
||
-- Expected error: | ||
-- | ||
-- (y : A) → ?1 (y = y) != A of type SSet | ||
-- when checking that the expression (y : A) → ? has type SSet |
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,2 @@ | ||
top_command (cmd_load currentFile []) | ||
goal_command 0 cmd_give "(y : A) → ?" |
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,9 @@ | ||
(agda2-status-action "") | ||
(agda2-info-action "*Type-checking*" "" nil) | ||
(agda2-highlight-clear) | ||
(agda2-status-action "") | ||
(agda2-info-action "*All Goals*" "?0 : SSet " nil) | ||
((last . 1) . (agda2-goals-action '(0))) | ||
(agda2-info-action "*Error*" "1,1-12 (y : A) → ?1 (y = y) != A of type SSet when checking that the expression (y : A) → ? has type SSet" nil) | ||
(agda2-highlight-load-and-delete-action) | ||
(agda2-status-action "") |