diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-06-09 09:31:50 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-06-09 09:31:50 +0200 |
commit | 0c5d0ecb7f6a1fecc382badae60df27b4bf169a4 (patch) | |
tree | 9bedaa5731c16c3da5fd53fbd5bb9b5ead88e307 /src/Data | |
parent | cf42449abd68cc5c5648a1321df21f3c481e8b87 (diff) |
Small cleanups
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Array/Nested/Internal/Mixed.hs | 5 | ||||
-rw-r--r-- | src/Data/Array/Nested/Internal/Ranked.hs | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Data/Array/Nested/Internal/Mixed.hs b/src/Data/Array/Nested/Internal/Mixed.hs index 1776687..dcd86d1 100644 --- a/src/Data/Array/Nested/Internal/Mixed.hs +++ b/src/Data/Array/Nested/Internal/Mixed.hs @@ -310,8 +310,9 @@ class Elt a where -- of this class with those of 'Elt': some instances have an additional -- "known-shape" constraint. -- --- This class is (currently) only required for 'mgenerate' / 'rgenerate' / --- 'sgenerate'. +-- This class is (currently) only required for 'mgenerate', +-- 'Data.Array.Nested.Ranked.rgenerate' and +-- 'Data.Array.Nested.Shaped.sgenerate'. class Elt a => KnownElt a where -- | Create an empty array. The given shape must have size zero; this may or may not be checked. memptyArray :: IShX sh -> Mixed sh a diff --git a/src/Data/Array/Nested/Internal/Ranked.hs b/src/Data/Array/Nested/Internal/Ranked.hs index ec18899..9383b08 100644 --- a/src/Data/Array/Nested/Internal/Ranked.hs +++ b/src/Data/Array/Nested/Internal/Ranked.hs @@ -377,9 +377,9 @@ rrerankP sn sh2 f (Ranked arr) -- to return an array with shape all-0 here (it probably didn't), but there is -- no better number to put here absent a subarray of the input to pass to @f@. rrerank :: forall n1 n2 n a b. (PrimElt a, PrimElt b) - => SNat n -> IShR n2 - -> (Ranked n1 a -> Ranked n2 b) - -> Ranked (n + n1) a -> Ranked (n + n2) b + => SNat n -> IShR n2 + -> (Ranked n1 a -> Ranked n2 b) + -> Ranked (n + n1) a -> Ranked (n + n2) b rrerank sn sh2 f (rtoPrimitive -> arr) = rfromPrimitive $ rrerankP sn sh2 (rtoPrimitive . f . rfromPrimitive) arr |