diff options
| -rw-r--r-- | src/Data/Array/Nested/Mixed.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Data/Array/Nested/Mixed.hs b/src/Data/Array/Nested/Mixed.hs index fc1c108..9f24aba 100644 --- a/src/Data/Array/Nested/Mixed.hs +++ b/src/Data/Array/Nested/Mixed.hs @@ -706,7 +706,7 @@ instance (KnownShX sh', KnownElt a) => KnownElt (Mixed sh' a) where mvecsReplicate sh example = do vecs <- mvecsUnsafeNew sh example - forM_ (shxEnum sh) $ \idx -> mvecsWrite sh idx example vecs + forM_ [0 .. shxSize sh - 1] $ \idx -> mvecsWriteLinear idx example vecs -- this is a slow case, but the alternative, mvecsUnsafeNew with manual -- writing in a loop, leads to every case being as slow return vecs |
