File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ import qualified Data.Traversable as T (Traversable(mapM))
228
228
-- | /O(1)/ Yield the length of the vector
229
229
length :: Vector v a => v a -> Int
230
230
{-# INLINE length #-}
231
- length = Bundle. length . stream
231
+ length = Bundle. length . stream'
232
232
233
233
-- | /O(1)/ Test whether a vector is empty
234
234
null :: Vector v a => v a -> Bool
@@ -1995,7 +1995,13 @@ unsafeCopy dst src = UNSAFE_CHECK(check) "unsafeCopy" "length mismatch"
1995
1995
-- | /O(1)/ Convert a vector to a 'Bundle'
1996
1996
stream :: Vector v a => v a -> Bundle v a
1997
1997
{-# INLINE_FUSED stream #-}
1998
- stream v = Bundle. fromVector v
1998
+ stream v = stream' v
1999
+
2000
+ -- Same as 'stream', but can be used to avoid having a cycle in the dependency
2001
+ -- graph of functions, which forces GHC to create a loop breaker.
2002
+ stream' :: Vector v a => v a -> Bundle v a
2003
+ {-# INLINE stream' #-}
2004
+ stream' v = Bundle. fromVector v
1999
2005
2000
2006
{-
2001
2007
stream v = v `seq` n `seq` (Bundle.unfoldr get 0 `Bundle.sized` Exact n)
You can’t perform that action at this time.
0 commit comments