diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-16 13:24:25 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-16 19:35:33 +0100 |
| commit | 682c584b26e872b7613cbcd73e3d15fc39867713 (patch) | |
| tree | 778abd95adb8516c8f3b83883f37ddcd26787c3f /src/Data/Array/Nested/Convert.hs | |
| parent | 6f2206b61ea05d4b1cd1fb6d0971484bbc820b02 (diff) | |
Define ix?FromLinear without TH
Diffstat (limited to 'src/Data/Array/Nested/Convert.hs')
| -rw-r--r-- | src/Data/Array/Nested/Convert.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Data/Array/Nested/Convert.hs b/src/Data/Array/Nested/Convert.hs index 32248c4..91752c4 100644 --- a/src/Data/Array/Nested/Convert.hs +++ b/src/Data/Array/Nested/Convert.hs @@ -63,8 +63,7 @@ import Data.Array.Nested.Types ixrFromIxS :: IxS sh i -> IxR (Rank sh) i ixrFromIxS = unsafeCoerce -ixrFromIxX :: IxX sh i -> IxR (Rank sh) i -ixrFromIxX = unsafeCoerce +-- ixrFromIxX re-exported shrFromShS :: ShS sh -> IShR (Rank sh) shrFromShS ZSS = ZSR @@ -97,9 +96,7 @@ ixsFromIxR' ZSS ZIR = ZIS ixsFromIxR' (_ :$$ sh) (n :.: idx) = n :.$ ixsFromIxR' sh idx ixsFromIxR' _ _ = error "ixsFromIxR': index rank does not match shape rank" --- TODO: remove the ShS now that no KnownNats is inside IxS. -ixsFromIxX :: ShS sh -> IxX (MapJust sh) i -> IxS sh i -ixsFromIxX _ = unsafeCoerce +-- ixsFromIxX re-exported -- TODO: if possible, remove the ShS now that no KnownNats is inside IxS. -- | Performs a runtime check that @Rank sh'@ match @Rank sh@. Equivalent to |
