From 31a603bb5d685306fe9561eac25c62b514c62be2 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Thu, 2 Apr 2026 10:32:53 +0200 Subject: Rename TakeLen functions to TakeLenPerm; same for Drop --- src/Data/Array/Nested/Shaped/Shape.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Data/Array/Nested/Shaped/Shape.hs') diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index ef91c7b..f83a065 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -424,17 +424,17 @@ shsAppend = :: MapJust sh ++ MapJust sh' :~: MapJust (sh ++ sh')) $ coerce (shxAppend @_ @_ @Int) -shsTakeLen :: forall is sh. Perm is -> ShS sh -> ShS (TakeLen is sh) -shsTakeLen = +shsTakeLenPerm :: forall is sh. Perm is -> ShS sh -> ShS (TakeLen is sh) +shsTakeLenPerm = gcastWith (unsafeCoerceRefl :: TakeLen is (MapJust sh) :~: MapJust (TakeLen is sh)) $ - coerce shxTakeLen + coerce shxTakeLenPerm -shsDropLen :: forall is sh. Perm is -> ShS sh -> ShS (DropLen is sh) -shsDropLen = +shsDropLenPerm :: forall is sh. Perm is -> ShS sh -> ShS (DropLen is sh) +shsDropLenPerm = gcastWith (unsafeCoerceRefl :: DropLen is (MapJust sh) :~: MapJust (DropLen is sh)) $ - coerce shxDropLen + coerce shxDropLenPerm shsPermute :: forall is sh. Perm is -> ShS sh -> ShS (Permute is sh) shsPermute = @@ -455,7 +455,7 @@ shsPermutePrefix perm (ShS shx) | Refl <- lemTakeLenMapJust perm sh , Refl <- lemDropLenMapJust perm sh , Refl <- lemPermuteMapJust perm sh - , Refl <- lemMapJustApp (shsPermute perm (shsTakeLen perm sh)) (shsDropLen perm sh) -} + , Refl <- lemMapJustApp (shsPermute perm (shsTakeLenPerm perm sh)) (shsDropLenPerm perm sh) -} = gcastWith (unsafeCoerceRefl :: Permute is (TakeLen is (MapJust sh)) ++ DropLen is (MapJust sh) -- cgit v1.3