From 9560d0f26420409afd2230fb7e5e111eafcced06 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Mon, 1 Dec 2025 01:44:05 +0100 Subject: Expose the unfolding of the indexing operations --- src/Data/Array/Nested/Mixed.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Data/Array/Nested/Mixed.hs') diff --git a/src/Data/Array/Nested/Mixed.hs b/src/Data/Array/Nested/Mixed.hs index 6d4ffd6..e3aa7a1 100644 --- a/src/Data/Array/Nested/Mixed.hs +++ b/src/Data/Array/Nested/Mixed.hs @@ -399,7 +399,9 @@ class Elt a => KnownElt a where -- Arrays of scalars are basically just arrays of scalars. instance Storable a => Elt (Primitive a) where mshape (M_Primitive sh _) = sh + {-# INLINEABLE mindex #-} mindex (M_Primitive _ a) i = Primitive (X.index a i) + {-# INLINEABLE mindexPartial #-} mindexPartial (M_Primitive sh a) i = M_Primitive (shxDropIx i sh) (X.indexPartial a i) mscalar (Primitive x) = M_Primitive ZSX (X.scalar x) mfromListOuterSN sn l@(arr1 :| _) = -- cgit v1.2.3-70-g09d2