diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-07 12:28:36 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-01-31 10:50:52 +0100 |
| commit | d825250d18ce646374d663c302e7ff86b29c698d (patch) | |
| tree | 04256ff495c210bf6c0d5ada90d574f39baacf34 /src/Data/Array/Nested/Shaped/Base.hs | |
| parent | b507634cc80ceb93d4c071b92645a79805859d6c (diff) | |
Add mvecsReplicate
Diffstat (limited to 'src/Data/Array/Nested/Shaped/Base.hs')
| -rw-r--r-- | src/Data/Array/Nested/Shaped/Base.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Shaped/Base.hs b/src/Data/Array/Nested/Shaped/Base.hs index 7ebc685..686f5fc 100644 --- a/src/Data/Array/Nested/Shaped/Base.hs +++ b/src/Data/Array/Nested/Shaped/Base.hs @@ -189,6 +189,10 @@ instance (KnownShS sh, KnownElt a) => KnownElt (Shaped sh a) where | Dict <- lemKnownMapJust (Proxy @sh) = MV_Shaped <$> mvecsUnsafeNew idx arr + mvecsReplicate idx (Shaped arr) + | Dict <- lemKnownMapJust (Proxy @sh) + = MV_Shaped <$> mvecsReplicate idx arr + mvecsNewEmpty _ | Dict <- lemKnownMapJust (Proxy @sh) = MV_Shaped <$> mvecsNewEmpty (Proxy @(Mixed (MapJust sh) a)) |
