diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-20 18:23:34 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-02-18 14:23:02 +0100 |
| commit | dc2c67e69d5e9617306afde45bcc69928614c065 (patch) | |
| tree | 82c44661a6743cad49322ad9bfdfd60c5cdf0c70 /src/Data/Array/Nested/Shaped/Shape.hs | |
| parent | ebcef9c52fa12be13bbe8498d10107fbccd637d7 (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 |
