From 2d837a1b4ef2914ac4bc8e012b31ff7abd4d2246 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Fri, 12 Dec 2025 23:28:02 +0100 Subject: Fix a few KnownNat in ShS-related TODOs and reword the rest --- src/Data/Array/Nested/Shaped.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Data/Array/Nested/Shaped.hs') 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) -- cgit v1.2.3-70-g09d2