aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Shaped/Shape.hs
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-16 09:51:51 +0100
committerMikolaj Konarski <mikolaj.konarski@funktory.com>2026-02-18 14:22:18 +0100
commitad02811570098124aab3d15638e28789679869f8 (patch)
treeef6c03b1fd7dcbdbdc0f3416ebb93f4d9b684e9a /src/Data/Array/Nested/Shaped/Shape.hs
parent2996d83966f9efb2c5c82b5796628777d696c565 (diff)
Make ShR a newtype over ShX
Diffstat (limited to 'src/Data/Array/Nested/Shaped/Shape.hs')
-rw-r--r--src/Data/Array/Nested/Shaped/Shape.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs
index a9bfe14..521ec2f 100644
--- a/src/Data/Array/Nested/Shaped/Shape.hs
+++ b/src/Data/Array/Nested/Shaped/Shape.hs
@@ -454,10 +454,10 @@ shsPermute =
coerce shxPermute
shsIndex :: forall i sh. SNat i -> ShS sh -> SNat (Index i sh)
-shsIndex i sh =
+shsIndex i (ShS sh) =
gcastWith (unsafeCoerceRefl
:: Index i (MapJust sh) :~: Just (Index i sh)) $
- case shxIndex i (coerce sh) of
+ case shxIndex @_ @_ @Int i sh of
SKnown SNat -> SNat
shsPermutePrefix :: forall is sh. Perm is -> ShS sh -> ShS (PermutePrefix is sh)