Skip to content

Commit 772613c

Browse files
committed
fix long standing bug in enumFromTo_double
thanks to Amos Robinson for helping figure out the correct implementation
1 parent 5a6541a commit 772613c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/Vector/Fusion/Bundle/Monadic.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ enumFromTo_char x y = x `seq` y `seq` fromStream (Stream step xn) (Exact n)
943943

944944
enumFromTo_double :: (Monad m, Ord a, RealFrac a) => a -> a -> Bundle m v a
945945
{-# INLINE_FUSED enumFromTo_double #-}
946-
enumFromTo_double n m = n `seq` m `seq` fromStream (Stream step n) (Max (len n m))
946+
enumFromTo_double n m = n `seq` m `seq` fromStream (Stream step n) (Max (len n lim))
947947
where
948948
lim = m + 1/2 -- important to float out
949949

0 commit comments

Comments
 (0)