diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-04-11 22:31:15 +0200 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-04-11 22:31:15 +0200 |
| commit | 1a0324d8c7ce40c0c0c4a09d1f143d36b21575ae (patch) | |
| tree | 3494d7b99ff3a744a0259583a801a3e1db415d40 /src | |
| parent | 00df247825d2d6012a91c80c46c4f556eff824a4 (diff) | |
Remove outdated haddocks about materialising lists
Diffstat (limited to 'src')
| -rw-r--r-- | src/Data/Array/Nested/Shaped.hs | 13 |
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 |
