-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
084c8f9
commit 4c50992
Showing
8 changed files
with
104 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Andreas, 2024-05-16, issue #7269 | ||
-- --no-syntax-based-termination should not turn on --type-based-termination | ||
|
||
{-# OPTIONS --no-type-based-termination #-} | ||
{-# OPTIONS --no-syntax-based-termination #-} -- Turns on TBT, but should not | ||
|
||
record U : Set where | ||
coinductive | ||
field force : U | ||
open U | ||
|
||
-- This should not pass since no termination checker is on. | ||
u : U | ||
u .force = u |
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 @@ | ||
AGDA_FAIL |
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,21 @@ | ||
-- Andreas, 2024-05-16, issue #7270 | ||
|
||
{-# OPTIONS --type-based-termination #-} | ||
|
||
record U : Set where | ||
coinductive | ||
field force : U | ||
open U | ||
|
||
postulate d : U → U | ||
|
||
-- f is classified as size preserving, but is not, since d is unknown | ||
-- Counterexamples: d = id; d u = u .force | ||
-- | ||
f : U → U | ||
f u = d u .force | ||
|
||
-- This should not pass: | ||
-- | ||
u : U | ||
u .force = f u |
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 @@ | ||
AGDA_FAIL |
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, 2024-05-16, issue #7271. | ||
-- Bug in size-preservation checker. | ||
|
||
{-# OPTIONS --type-based-termination #-} | ||
|
||
data ⊥ : Set where | ||
|
||
record _×_ (A B : Set) : Set where | ||
field | ||
fst : A | ||
snd : B | ||
open _×_ | ||
|
||
-- Empty stream type. | ||
-- | ||
record S : Set where | ||
coinductive; constructor delay | ||
field force : ⊥ × S | ||
open S | ||
|
||
-- This is not size-preserving: | ||
-- | ||
f : S → ⊥ × S | ||
f s = s' .force where s' = s | ||
|
||
-- This should not be accepted: | ||
-- | ||
s : S | ||
s .force = f s | ||
|
||
absurd : ⊥ | ||
absurd = s .force .fst |
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 @@ | ||
AGDA_FAIL |
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,33 @@ | ||
-- Andreas, 2024-05-16, issue #7271. | ||
-- Bug in size-preservation checker. | ||
|
||
{-# OPTIONS --type-based-termination #-} | ||
|
||
data ⊥ : Set where | ||
|
||
record _×_ (A B : Set) : Set where | ||
field | ||
fst : A | ||
snd : B | ||
open _×_ | ||
|
||
-- Empty stream type. | ||
-- | ||
record S : Set where | ||
coinductive; constructor delay | ||
field force : ⊥ × S | ||
open S | ||
|
||
-- This is not size-preserving: | ||
-- | ||
f : S → ⊥ × S | ||
f s with s | ||
... | s' = s' .force | ||
|
||
-- This should not be accepted: | ||
-- | ||
s : S | ||
s .force = f s | ||
|
||
absurd : ⊥ | ||
absurd = s .force .fst |
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 @@ | ||
AGDA_FAIL |