aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Internal/Shaped.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-06-09 20:47:09 +0200
committerTom Smeding <tom@tomsmeding.com>2024-06-09 20:47:30 +0200
commit5763bf70dc67c5437207ff8e9dd08585d2ea5384 (patch)
tree8b68dae165940368925a3cbe816a61a65eb23b68 /src/Data/Array/Nested/Internal/Shaped.hs
parentcb98a56767d50fe92790ae4f48a3efbb28aab90a (diff)
Concatenation of arrays for M and R
What should the type of sconcat be?
Diffstat (limited to 'src/Data/Array/Nested/Internal/Shaped.hs')
-rw-r--r--src/Data/Array/Nested/Internal/Shaped.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Data/Array/Nested/Internal/Shaped.hs b/src/Data/Array/Nested/Internal/Shaped.hs
index b4dc80d..7d523b0 100644
--- a/src/Data/Array/Nested/Internal/Shaped.hs
+++ b/src/Data/Array/Nested/Internal/Shaped.hs
@@ -17,7 +17,7 @@
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
module Data.Array.Nested.Internal.Shaped where
-import Prelude hiding (mappend)
+import Prelude hiding (mappend, mconcat)
import Control.DeepSeq (NFData)
import Control.Monad.ST
@@ -104,6 +104,8 @@ instance Elt a => Elt (Shaped sh a) where
mtranspose perm (M_Shaped arr) = M_Shaped (mtranspose perm arr)
+ mconcat l = M_Shaped (mconcat (coerce l))
+
type ShapeTree (Shaped sh a) = (ShS sh, ShapeTree a)
mshapeTree (Shaped arr) = first shCvtXS' (mshapeTree arr)