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/Shaped/Shape.hs | |
| parent | d076a85139c89f20898f957220825c0449eafb4f (diff) | |
Remove ixsFromIxR' and simplify ixsFromIxR
Diffstat (limited to 'src/Data/Array/Nested/Shaped/Shape.hs')
| -rw-r--r-- | src/Data/Array/Nested/Shaped/Shape.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index 8cd937c..c5e3202 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -275,14 +275,14 @@ ixsToLinear :: Num i => ShS sh -> IxS sh i -> i ixsToLinear (ShS sh) ix = ixxToLinear sh (ixxFromIxS ix) ixxFromIxS :: IxS sh i -> IxX (MapJust sh) i -ixxFromIxS = unsafeCoerce +ixxFromIxS = unsafeCoerce -- TODO: switch to coerce once newtypes overhauled {-# INLINEABLE ixsFromLinear #-} ixsFromLinear :: Num i => ShS sh -> Int -> IxS sh i ixsFromLinear (ShS sh) i = ixsFromIxX $ ixxFromLinear sh i ixsFromIxX :: IxX (MapJust sh) i -> IxS sh i -ixsFromIxX = unsafeCoerce +ixsFromIxX = unsafeCoerce -- TODO: switch to coerce once newtypes overhauled shsEnum :: ShS sh -> [IIxS sh] shsEnum = shsEnum' @@ -290,7 +290,7 @@ shsEnum = shsEnum' {-# INLINABLE shsEnum' #-} -- ensure this can be specialised at use site shsEnum' :: Num i => ShS sh -> [IxS sh i] shsEnum' (ShS sh) = (unsafeCoerce :: [IxX (MapJust sh) i] -> [IxS sh i]) $ shxEnum' sh - + -- TODO: switch to coerce once newtypes overhauled -- * Shaped shapes |
