From 550a05c13d0cbb6ebd4c48e9215666628efac5b6 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Tue, 16 Dec 2025 09:51:51 +0100 Subject: Make ShR a newtype over ShX --- src/Data/Array/Nested/Shaped/Shape.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Data/Array/Nested/Shaped') 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) -- cgit v1.2.3-70-g09d2