mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-11 03:34:13 +03:00
Fix checkPossible when unifying bound vars
It's not a rigid fail if it's two bound variables that differ. Fixes #1108
This commit is contained in:
parent
87897174e5
commit
57cd38ae11
@ -279,6 +279,9 @@ Extra-source-files:
|
|||||||
test/reg055/run
|
test/reg055/run
|
||||||
test/reg055/*.idr
|
test/reg055/*.idr
|
||||||
test/reg055/expected
|
test/reg055/expected
|
||||||
|
test/reg056/run
|
||||||
|
test/reg056/*.idr
|
||||||
|
test/reg056/expected
|
||||||
|
|
||||||
test/basic001/run
|
test/basic001/run
|
||||||
test/basic001/*.idr
|
test/basic001/*.idr
|
||||||
|
@ -497,6 +497,7 @@ checkPossible info fc tcgen fname lhs_in
|
|||||||
|
|
||||||
ntRec x y | Ref <- x = True
|
ntRec x y | Ref <- x = True
|
||||||
| Ref <- y = True
|
| Ref <- y = True
|
||||||
|
| (Bound, Bound) <- (x, y) = True
|
||||||
| otherwise = False -- name is different, unrecoverable
|
| otherwise = False -- name is different, unrecoverable
|
||||||
|
|
||||||
propagateParams :: IState -> [Name] -> Type -> PTerm -> PTerm
|
propagateParams :: IState -> [Name] -> Type -> PTerm -> PTerm
|
||||||
|
2
test/reg056/expected
Normal file
2
test/reg056/expected
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
reg056.idr:7:7:dodgy n m Refl is a valid case
|
||||||
|
reg056.idr:10:6:nonk Refl is a valid case
|
15
test/reg056/reg056.idr
Normal file
15
test/reg056/reg056.idr
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
k : (a : Type) -> (x, y : a) -> (p, q : x = y) -> p = q
|
||||||
|
k a x x Refl Refl = Refl
|
||||||
|
|
||||||
|
postulate trap : Z = Z
|
||||||
|
|
||||||
|
dodgy : (a, b : ()) -> a = b -> Void
|
||||||
|
dodgy n m Refl impossible
|
||||||
|
|
||||||
|
nonk : (trap = Refl {Z}) -> Void
|
||||||
|
nonk Refl impossible
|
||||||
|
|
||||||
|
false : Void
|
||||||
|
false = nonk (k Nat Z Z trap Refl)
|
||||||
|
|
||||||
|
|
3
test/reg056/run
Executable file
3
test/reg056/run
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
idris $@ reg056.idr -o reg056
|
||||||
|
rm -f *.ibc
|
Loading…
Reference in New Issue
Block a user