From 1a0324d8c7ce40c0c0c4a09d1f143d36b21575ae Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Sat, 11 Apr 2026 22:31:15 +0200 Subject: Remove outdated haddocks about materialising lists --- src/Data/Array/Nested/Shaped.hs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/Data/Array/Nested') 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 -- cgit v1.3