diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-11 14:22:07 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-11 14:22:07 +0100 |
| commit | 704247b2dddfd481841e70d4dc440d909e9cdc29 (patch) | |
| tree | 2934252e2e172769f5c68a99700037b586b39b40 /src/Data/Array/Nested | |
| parent | 0cac4de0104ac6e5c72b34c7c2d9fbaae41f4666 (diff) | |
Generalize shsTakeIx
Diffstat (limited to 'src/Data/Array/Nested')
| -rw-r--r-- | src/Data/Array/Nested/Shaped.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Data/Array/Nested/Shaped.hs b/src/Data/Array/Nested/Shaped.hs index 99ad590..d23a025 100644 --- a/src/Data/Array/Nested/Shaped.hs +++ b/src/Data/Array/Nested/Shaped.hs @@ -56,7 +56,7 @@ ssize = shsSize . sshape sindex :: Elt a => Shaped sh a -> IIxS sh -> a sindex (Shaped arr) idx = mindex arr (ixxFromIxS idx) -shsTakeIx :: Proxy sh' -> ShS (sh ++ sh') -> IIxS sh -> ShS sh +shsTakeIx :: Proxy sh' -> ShS (sh ++ sh') -> IxS sh i -> ShS sh shsTakeIx _ _ ZIS = ZSS shsTakeIx p sh (_ :.$ idx) = case sh of n :$$ sh' -> n :$$ shsTakeIx p sh' idx |
