From 910633f45fd7ad2612895630bf0695f816131cd2 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 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) -- cgit v1.2.3-70-g09d2