From bc8e904b3cc7b98a4809357321ce3d1196df3701 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Sat, 20 Dec 2025 18:23:34 +0100 Subject: Remove ixsFromIxR' and simplify ixsFromIxR --- src/Data/Array/Nested/Ranked/Shape.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Data/Array/Nested/Ranked') diff --git a/src/Data/Array/Nested/Ranked/Shape.hs b/src/Data/Array/Nested/Ranked/Shape.hs index 2415e26..6d47ade 100644 --- a/src/Data/Array/Nested/Ranked/Shape.hs +++ b/src/Data/Array/Nested/Ranked/Shape.hs @@ -293,7 +293,7 @@ ixrToLinear :: Num i => IShR m -> IxR m i -> i ixrToLinear (ShR sh) ix = ixxToLinear sh (ixxFromIxR ix) ixxFromIxR :: IxR n i -> IxX (Replicate n Nothing) i -ixxFromIxR = unsafeCoerce +ixxFromIxR = unsafeCoerce -- TODO: switch to coerce once newtypes overhauled {-# INLINEABLE ixrFromLinear #-} ixrFromLinear :: forall i m. Num i => IShR m -> Int -> IxR m i @@ -302,7 +302,7 @@ ixrFromLinear (ShR sh) i = ixrFromIxX $ ixxFromLinear sh i ixrFromIxX :: IxX sh i -> IxR (Rank sh) i -ixrFromIxX = unsafeCoerce +ixrFromIxX = unsafeCoerce -- TODO: switch to coerce once newtypes overhauled shrEnum :: IShR n -> [IIxR n] shrEnum = shrEnum' @@ -312,7 +312,7 @@ shrEnum' :: forall i n. Num i => IShR n -> [IxR n i] shrEnum' (ShR sh) | Refl <- lemRankReplicate (Proxy @n) = (unsafeCoerce :: [IxX (Replicate n Nothing) i] -> [IxR n i]) $ shxEnum' sh - + -- TODO: switch to coerce once newtypes overhauled -- * Ranked shapes -- cgit v1.2.3-70-g09d2