File tree Expand file tree Collapse file tree 6 files changed +42
-6
lines changed Expand file tree Collapse file tree 6 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -2172,7 +2172,13 @@ toList :: Vector a -> [a]
2172
2172
{-# INLINE toList #-}
2173
2173
toList = G. toList
2174
2174
2175
- -- | /O(n)/ Convert a list to a vector.
2175
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
2176
+ -- vector’s capacity will be doubling until the list's contents are
2177
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
2178
+ -- capacity might be empty. If you’d rather avoid this, you can use
2179
+ -- 'fromListN', which will provide the exact space the list requires but will
2180
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
2181
+ -- vector and then copy it without the superfluous space.
2176
2182
fromList :: [a ] -> Vector a
2177
2183
{-# INLINE fromList #-}
2178
2184
fromList = G. fromList
Original file line number Diff line number Diff line change @@ -2364,7 +2364,13 @@ toList :: Vector v a => v a -> [a]
2364
2364
{-# INLINE toList #-}
2365
2365
toList = Bundle. toList . stream
2366
2366
2367
- -- | /O(n)/ Convert a list to a vector.
2367
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
2368
+ -- vector’s capacity will be doubling until the list's contents are
2369
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
2370
+ -- capacity might be empty. If you’d rather avoid this, you can use
2371
+ -- 'fromListN', which will provide the exact space the list requires but will
2372
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
2373
+ -- vector and then copy it without the superfluous space.
2368
2374
fromList :: Vector v a => [a ] -> v a
2369
2375
{-# INLINE fromList #-}
2370
2376
fromList = unstream . Bundle. fromList
Original file line number Diff line number Diff line change @@ -1836,7 +1836,13 @@ toList :: Prim a => Vector a -> [a]
1836
1836
{-# INLINE toList #-}
1837
1837
toList = G. toList
1838
1838
1839
- -- | /O(n)/ Convert a list to a vector.
1839
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
1840
+ -- vector’s capacity will be doubling until the list's contents are
1841
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
1842
+ -- capacity might be empty. If you’d rather avoid this, you can use
1843
+ -- 'fromListN', which will provide the exact space the list requires but will
1844
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
1845
+ -- vector and then copy it without the superfluous space.
1840
1846
fromList :: Prim a => [a ] -> Vector a
1841
1847
{-# INLINE fromList #-}
1842
1848
fromList = G. fromList
Original file line number Diff line number Diff line change @@ -1883,7 +1883,13 @@ toList :: Storable a => Vector a -> [a]
1883
1883
{-# INLINE toList #-}
1884
1884
toList = G. toList
1885
1885
1886
- -- | /O(n)/ Convert a list to a vector.
1886
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
1887
+ -- vector’s capacity will be doubling until the list's contents are
1888
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
1889
+ -- capacity might be empty. If you’d rather avoid this, you can use
1890
+ -- 'fromListN', which will provide the exact space the list requires but will
1891
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
1892
+ -- vector and then copy it without the superfluous space.
1887
1893
fromList :: Storable a => [a ] -> Vector a
1888
1894
{-# INLINE fromList #-}
1889
1895
fromList = G. fromList
Original file line number Diff line number Diff line change @@ -2442,7 +2442,13 @@ toList :: Vector a -> [a]
2442
2442
{-# INLINE toList #-}
2443
2443
toList = G. toList
2444
2444
2445
- -- | /O(n)/ Convert a list to a vector.
2445
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
2446
+ -- vector’s capacity will be doubling until the list's contents are
2447
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
2448
+ -- capacity might be empty. If you’d rather avoid this, you can use
2449
+ -- 'fromListN', which will provide the exact space the list requires but will
2450
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
2451
+ -- vector and then copy it without the superfluous space.
2446
2452
--
2447
2453
-- @since 0.13.2.0
2448
2454
fromList :: [a ] -> Vector a
Original file line number Diff line number Diff line change @@ -1928,7 +1928,13 @@ toList :: Unbox a => Vector a -> [a]
1928
1928
{-# INLINE toList #-}
1929
1929
toList = G. toList
1930
1930
1931
- -- | /O(n)/ Convert a list to a vector.
1931
+ -- | /O(n)/ Convert a list to a vector. During the operation, the
1932
+ -- vector’s capacity will be doubling until the list's contents are
1933
+ -- in the vector. Depending on the list’s size, up to half of the vector’s
1934
+ -- capacity might be empty. If you’d rather avoid this, you can use
1935
+ -- 'fromListN', which will provide the exact space the list requires but will
1936
+ -- prevent list fusion, or @'force' . 'fromList'@, which will create the
1937
+ -- vector and then copy it without the superfluous space.
1932
1938
fromList :: Unbox a => [a ] -> Vector a
1933
1939
{-# INLINE fromList #-}
1934
1940
fromList = G. fromList
You can’t perform that action at this time.
0 commit comments