diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-05-20 18:47:21 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-05-20 18:47:54 +0200 |
commit | 03de6cb0a8b9ae114edb3690dc096b17a98b7b4f (patch) | |
tree | d8bb704818c8555b34b760e08ab72138d7fd861e /src/Data/Array | |
parent | 03ef563a681fce281c07d03efc693ecd343cf23d (diff) |
Fix type of srerank
Diffstat (limited to 'src/Data/Array')
-rw-r--r-- | src/Data/Array/Nested/Internal.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Data/Array/Nested/Internal.hs b/src/Data/Array/Nested/Internal.hs index 8f18724..9b505ea 100644 --- a/src/Data/Array/Nested/Internal.hs +++ b/src/Data/Array/Nested/Internal.hs @@ -1679,11 +1679,11 @@ srerankP sh sh2 f sarr@(Shaped arr) arr) srerank :: forall sh1 sh2 sh a. PrimElt a - => StaticShX sh -> IShX sh2 - -> (Mixed sh1 a -> Mixed sh2 a) - -> Mixed (sh ++ sh1) a -> Mixed (sh ++ sh2) a -srerank ssh sh2 f (toPrimitive -> arr) = - fromPrimitive $ mrerankP ssh sh2 (toPrimitive . f . fromPrimitive) arr + => ShS sh -> ShS sh2 + -> (Shaped sh1 a -> Shaped sh2 a) + -> Shaped (sh ++ sh1) a -> Shaped (sh ++ sh2) a +srerank sh sh2 f (stoPrimitive -> arr) = + sfromPrimitive $ srerankP sh sh2 (stoPrimitive . f . sfromPrimitive) arr sreplicateP :: forall sh a. Storable a => ShS sh -> a -> Shaped sh (Primitive a) sreplicateP sh x = Shaped (mreplicateP (shCvtSX sh) x) |