From 03de6cb0a8b9ae114edb3690dc096b17a98b7b4f Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 20 May 2024 18:47:21 +0200 Subject: Fix type of srerank --- src/Data/Array/Nested/Internal.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Data/Array/Nested') 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) -- cgit v1.2.3-70-g09d2