diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-12 23:28:02 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-12 23:28:48 +0100 |
| commit | 2d837a1b4ef2914ac4bc8e012b31ff7abd4d2246 (patch) | |
| tree | 532ef97945597f2e5ebc2f9d612645d0fe7e23e6 /src/Data/Array/Nested/Shaped.hs | |
| parent | 17c792cf4ea3d4ff83ba765de98a448ccd03ba9e (diff) | |
Fix a few KnownNat in ShS-related TODOs and reword the restmvecsReplicate
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 d23a025..85042f2 100644 --- a/src/Data/Array/Nested/Shaped.hs +++ b/src/Data/Array/Nested/Shaped.hs @@ -246,9 +246,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) |
