diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-12 23:28:02 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-02-18 14:22:18 +0100 |
| commit | 910633f45fd7ad2612895630bf0695f816131cd2 (patch) | |
| tree | f20953849a37dfd9d310f109ba17756e1cfe5ada /src/Data/Array/Nested/Shaped.hs | |
| parent | e1ec55b8ddaa04458e863eb67536648ec8b0eec2 (diff) | |
Fix a few KnownNat in ShS-related TODOs and reword the rest
Diffstat (limited to 'src/Data/Array/Nested/Shaped.hs')
| -rw-r--r-- | src/Data/Array/Nested/Shaped.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Data/Array/Nested/Shaped.hs b/src/Data/Array/Nested/Shaped.hs index acb7c89..142a536 100644 --- a/src/Data/Array/Nested/Shaped.hs +++ b/src/Data/Array/Nested/Shaped.hs @@ -255,9 +255,7 @@ sreshape :: (Elt a, Product sh ~ Product sh') => ShS sh' -> Shaped sh a -> Shape sreshape sh' (Shaped arr) = Shaped (mreshape (shxFromShS sh') arr) sflatten :: Elt a => Shaped sh a -> Shaped '[Product sh] a -sflatten arr = - case shsProduct (sshape arr) of -- TODO: simplify when removing the KnownNat stuff - n@SNat -> sreshape (n :$$ ZSS) arr +sflatten arr = sreshape (shsProduct (sshape arr) :$$ ZSS) arr siota :: (Enum a, PrimElt a) => SNat n -> Shaped '[n] a siota sn = Shaped (miota sn) |
