[commit: packages/containers] develop-0.6, develop-0.6-questionable, master, zip-devel: Force prefix and suffix before middle (7dfdc33)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 16:21:12 UTC 2015


Repository : ssh://git@git.haskell.org/containers

On branches: develop-0.6,develop-0.6-questionable,master,zip-devel
Link       : http://git.haskell.org/packages/containers.git/commitdiff/7dfdc33f8cc740036cee5a5e94c5603722d6fd02

>---------------------------------------------------------------

commit 7dfdc33f8cc740036cee5a5e94c5603722d6fd02
Author: treeowl <David.Feuer at gmail.com>
Date:   Sat Nov 8 22:08:19 2014 -0500

    Force prefix and suffix before middle
    
    This should be slightly more efficient. Probably very slightly, but there doesn't seem to be a good reason not to.


>---------------------------------------------------------------

7dfdc33f8cc740036cee5a5e94c5603722d6fd02
 Data/Sequence.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index a2b4844..1952b1c 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -346,7 +346,7 @@ instance Traversable FingerTree where
 instance NFData a => NFData (FingerTree a) where
     rnf (Empty) = ()
     rnf (Single x) = rnf x
-    rnf (Deep _ pr m sf) = rnf pr `seq` rnf m `seq` rnf sf
+    rnf (Deep _ pr m sf) = rnf pr `seq` rnf sf `seq` rnf m
 
 {-# INLINE deep #-}
 deep            :: Sized a => Digit a -> FingerTree (Node a) -> Digit a -> FingerTree a



More information about the ghc-commits mailing list