-
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.
Fix #7146: fix and harden instance Pretty NamedBinding
Do deep pattern matching to prevent bit-rotting of this function in the future. It stated to malfunction when cohesion was added.
- Loading branch information
1 parent
0f95e33
commit 9702781
Showing
6 changed files
with
77 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Issue3945.agda:10,8-25 | ||
Incorrect cohesion annotation in lambda | ||
when checking that the expression λ @♭ a → flat a has type | ||
when checking that the expression λ (@♭ a) → flat a has type | ||
A → Flat 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Issue5033.agda:4,10-29 | ||
Missing binding for primLockUniv primitive. | ||
when checking that the expression ∀ _ → Set is a type | ||
when checking that the expression ∀ (@tick _) → Set is a type |
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,34 @@ | ||
-- Andreas, 2024-02-25, issue #7146, printer bugs: | ||
-- Missing parenthesis in domain-free module parameter with cohesion. | ||
-- Missing printing of @lock attribute. | ||
|
||
{-# OPTIONS --cohesion --erasure --guarded #-} | ||
|
||
import Agda.Builtin.Bool | ||
open import Agda.Builtin.Sigma | ||
|
||
primitive | ||
primLockUniv : Set₁ | ||
|
||
postulate | ||
Tick : primLockUniv | ||
Foo : @♭ Set → Tick → Set | ||
|
||
module @0 Bool where | ||
|
||
-- Trigger an error here printing the module telescope, e.g. | ||
-- "Not supported: open public in hard compile-time mode". | ||
|
||
open module M (@♭ A) (@lock l) (_ : Foo A l) {@ω B = C : Set} {D : C → Set} {p@(u , v) : Σ C D} | ||
= Agda.Builtin.Bool public | ||
|
||
-- Expect to fail. | ||
-- | ||
-- Error was: | ||
-- when checking the module application | ||
-- module M @♭ A l (_ : Foo A l) ... | ||
-- | ||
-- This misprints the module parameters, correct is: | ||
-- module M (@♭ A) (@lock l) ... | ||
-- | ||
-- Should print the module telescope correctly. |
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,7 @@ | ||
Issue7146.agda:22,3-23,31 | ||
Not supported: open public in hard compile-time mode (for instance | ||
in erased modules) | ||
when checking the module application | ||
module M (@♭ A) (@lock l) (_ : Foo A l) {@ω B = C : Set} | ||
{D : C → Set} {p @ (u , v) : Σ C D} | ||
= Agda.Builtin.Bool |