aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Internal/Mixed.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-11-22 18:54:01 +0100
committerTom Smeding <tom@tomsmeding.com>2024-11-22 18:54:01 +0100
commitdd21ebafeeeb2abc222b3525e136d4ba6a769176 (patch)
tree0fa92b45ae5dee11f8e8bbf40d84ffec05aaa059 /src/Data/Array/Nested/Internal/Mixed.hs
parent03b7cea970d0840a913b6e64a9439fb115dea8d0 (diff)
[mrs]{un,}zipsingletons
Diffstat (limited to 'src/Data/Array/Nested/Internal/Mixed.hs')
-rw-r--r--src/Data/Array/Nested/Internal/Mixed.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Internal/Mixed.hs b/src/Data/Array/Nested/Internal/Mixed.hs
index 8d239cf..619d9bc 100644
--- a/src/Data/Array/Nested/Internal/Mixed.hs
+++ b/src/Data/Array/Nested/Internal/Mixed.hs
@@ -790,6 +790,12 @@ mnest ssh arr = M_Nest (fst (shxSplitApp (Proxy @sh') ssh (mshape arr))) arr
munNest :: Mixed sh (Mixed sh' a) -> Mixed (sh ++ sh') a
munNest (M_Nest _ arr) = arr
+mzip :: Mixed sh a -> Mixed sh b -> Mixed sh (a, b)
+mzip = M_Tup2
+
+munzip :: Mixed sh (a, b) -> (Mixed sh a, Mixed sh b)
+munzip (M_Tup2 a b) = (a, b)
+
mrerankP :: forall sh1 sh2 sh a b. (Storable a, Storable b)
=> StaticShX sh -> IShX sh2
-> (Mixed sh1 (Primitive a) -> Mixed sh2 (Primitive b))