aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Array/Nested')
-rw-r--r--src/Data/Array/Nested/Shaped.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Data/Array/Nested/Shaped.hs b/src/Data/Array/Nested/Shaped.hs
index f1636c5..be1bfc5 100644
--- a/src/Data/Array/Nested/Shaped.hs
+++ b/src/Data/Array/Nested/Shaped.hs
@@ -146,19 +146,11 @@ stoVector = coerce mtoVector
-- shape; if they do not, a runtime error will be thrown. See the
-- documentation of 'mgenerate' for more information about this restriction.
--
--- Because the length of the 'NonEmpty' list is unknown, its spine must be
--- materialised in memory in order to compute its length. If its length is
--- already known, use 'sfromListOuterSN' to be able to stream the list.
---
-- If your array is 1-dimensional and contains scalars, use 'sfromList1Prim'.
sfromListOuter :: Elt a => SNat n -> NonEmpty (Shaped sh a) -> Shaped (n : sh) a
sfromListOuter = coerce mfromListOuterSN
--- | Because the length of the 'NonEmpty' list is unknown, its spine must be
--- materialised in memory in order to compute its length. If its length is
--- already known, use 'sfromList1SN' to be able to stream the list.
---
--- If the elements are scalars, 'sfromList1Prim' is faster.
+-- | If the elements are scalars, 'sfromList1Prim' is faster.
sfromList1 :: Elt a => SNat n -> NonEmpty a -> Shaped '[n] a
sfromList1 = coerce mfromList1SN
@@ -166,9 +158,6 @@ sfromList1 = coerce mfromList1SN
sfromListLinear :: forall sh a. Elt a => ShS sh -> NonEmpty a -> Shaped sh a
sfromListLinear sh l = Shaped (mfromListLinear (shxFromShS sh) l)
--- | Because the length of the list is unknown, its spine must be materialised
--- in memory in order to compute its length. If its length is already known,
--- use 'sfromList1PrimN' to be able to stream the list.
sfromList1Prim :: forall n a. PrimElt a => SNat n -> [a] -> Shaped '[n] a
sfromList1Prim = coerce mfromList1PrimSN