diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-01 01:44:05 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-01 16:06:57 +0100 |
| commit | 9560d0f26420409afd2230fb7e5e111eafcced06 (patch) | |
| tree | 5f64f9adfc521143bdf86be3128364aee4679c55 /src/Data/Array/Nested/Mixed.hs | |
| parent | a06c6416bab1639e5c3bd99b3c10de4dcf6c32f9 (diff) | |
Expose the unfolding of the indexing operations
Diffstat (limited to 'src/Data/Array/Nested/Mixed.hs')
| -rw-r--r-- | src/Data/Array/Nested/Mixed.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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 :| _) = |
