From 5c926beb1aeed724787812c35a70c5ae362bc1f7 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Fri, 16 May 2025 13:42:47 +0200 Subject: Generalize some shape conversion functions --- src/Data/Array/Nested/Shaped/Shape.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Data/Array/Nested/Shaped') diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index 5a1003f..ac85e0e 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -231,11 +231,11 @@ ixsZero :: ShS sh -> IIxS sh ixsZero ZSS = ZIS ixsZero (_ :$$ sh) = 0 :.$ ixsZero sh -ixsFromIxX :: ShS sh -> IIxX (MapJust sh) -> IIxS sh +ixsFromIxX :: ShS sh -> IxX (MapJust sh) i -> IxS sh i ixsFromIxX ZSS ZIX = ZIS ixsFromIxX (_ :$$ sh) (n :.% idx) = n :.$ ixsFromIxX sh idx -ixxFromIxS :: IIxS sh -> IIxX (MapJust sh) +ixxFromIxS :: IxS sh i -> IxX (MapJust sh) i ixxFromIxS ZIS = ZIX ixxFromIxS (n :.$ sh) = n :.% ixxFromIxS sh -- cgit v1.2.3-70-g09d2