mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-23 03:05:00 +03:00
Add a test for non linear LHS
This commit is contained in:
parent
8081b0374a
commit
d256dbf5ec
@ -11,7 +11,7 @@ ttimpTests
|
||||
"eta001", "eta002",
|
||||
"nest001", "nest002",
|
||||
"perf001", "perf002", "perf003",
|
||||
"qtt001", "qtt002"]
|
||||
"qtt001", "qtt002", "qtt003"]
|
||||
|
||||
chdir : String -> IO Bool
|
||||
chdir dir
|
||||
|
8
tests/ttimp/qtt003/QTTEq.yaff
Normal file
8
tests/ttimp/qtt003/QTTEq.yaff
Normal file
@ -0,0 +1,8 @@
|
||||
data Eq : $a -> $b -> Type where
|
||||
Refl : Eq $x $x
|
||||
|
||||
okay : {p : $a -> $b} -> (1 x : $a) -> (1 y : $a) -> (1 prf : Eq x y) ->
|
||||
p x -> p y
|
||||
-- Should fail on the LHS, before even getting to the RHS, because
|
||||
-- after elaboration 'x' appears twice even though it is linearly bound.
|
||||
okay _ $x Refl $q = q
|
3
tests/ttimp/qtt003/expected
Normal file
3
tests/ttimp/qtt003/expected
Normal file
@ -0,0 +1,3 @@
|
||||
Processing as TTImp
|
||||
QTTEq.yaff:8:1--9:1:There are 2 uses of linear name x
|
||||
Yaffle> Yaffle> Yaffle> Yaffle> Yaffle> Bye for now!
|
5
tests/ttimp/qtt003/input
Normal file
5
tests/ttimp/qtt003/input
Normal file
@ -0,0 +1,5 @@
|
||||
:t foo
|
||||
:t bar
|
||||
:t baz1
|
||||
:t baz2
|
||||
:q
|
3
tests/ttimp/qtt003/run
Executable file
3
tests/ttimp/qtt003/run
Executable file
@ -0,0 +1,3 @@
|
||||
$1 QTTEq.yaff < input
|
||||
|
||||
rm -rf build
|
Loading…
Reference in New Issue
Block a user