diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-20 18:23:34 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-20 19:59:39 +0100 |
| commit | bc8e904b3cc7b98a4809357321ce3d1196df3701 (patch) | |
| tree | fd0e0fa01b75d126da213cd90afb70bd00b5f971 /src/Data/Array/Nested/Ranked/Shape.hs | |
| parent | d076a85139c89f20898f957220825c0449eafb4f (diff) | |
Remove ixsFromIxR' and simplify ixsFromIxR
Diffstat (limited to 'src/Data/Array/Nested/Ranked/Shape.hs')
| -rw-r--r-- | src/Data/Array/Nested/Ranked/Shape.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
