aboutsummaryrefslogtreecommitdiff
path: root/src/Data
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-10-21 10:44:18 +0200
committerTom Smeding <tom@tomsmeding.com>2025-10-21 10:44:18 +0200
commit0096708a7b8d7d299e006a29ca4760d2c6c68629 (patch)
tree12255ef1856abc5a7f618c0190a073a5655319bc /src/Data
parent069ac5b0bcf52b8b5414261106e82ef0eb8a582e (diff)
Revert "Remove a spurious case now correclty rules out by the plugins"
This reverts commit 069ac5b0bcf52b8b5414261106e82ef0eb8a582e. The plugins are unsound: https://github.com/clash-lang/ghc-typelits-natnormalise/issues/105
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Array/Nested/Ranked/Shape.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Ranked/Shape.hs b/src/Data/Array/Nested/Ranked/Shape.hs
index 837b1ac..488b4d8 100644
--- a/src/Data/Array/Nested/Ranked/Shape.hs
+++ b/src/Data/Array/Nested/Ranked/Shape.hs
@@ -134,6 +134,7 @@ listrCast = listrCastWithName "listrCast"
listrIndex :: forall k n i. (k + 1 <= n) => SNat k -> ListR n i -> i
listrIndex SZ (x ::: _) = x
listrIndex (SS i) (_ ::: xs) | Refl <- lemLeqSuccSucc (Proxy @k) (Proxy @n) = listrIndex i xs
+listrIndex _ ZR = error "k + 1 <= 0"
listrZip :: ListR n i -> ListR n j -> ListR n (i, j)
listrZip ZR ZR = ZR