[commit: bytestring] ghc-7.6: Add a NOINLINE [1] for zipWith as it is matched in a RULE (5f097ae)
Paolo Capriotti
p.capriotti at gmail.com
Thu Sep 6 12:28:41 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/bytestring
On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/5f097ae7d2a81357b3f7fec90f7945353b92273f
>---------------------------------------------------------------
commit 5f097ae7d2a81357b3f7fec90f7945353b92273f
Author: Duncan Coutts <duncan at community.haskell.org>
Date: Mon Aug 27 22:09:05 2012 +0000
Add a NOINLINE [1] for zipWith as it is matched in a RULE
GHC correctly warns that RULES cannot reliably match on functions
that get inlined too early. Spotted by Paolo Capriotti.
>---------------------------------------------------------------
Data/ByteString.hs | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Data/ByteString.hs b/Data/ByteString.hs
index 627ddae..549431a 100644
--- a/Data/ByteString.hs
+++ b/Data/ByteString.hs
@@ -1489,6 +1489,7 @@ zipWith :: (Word8 -> Word8 -> a) -> ByteString -> ByteString -> [a]
zipWith f ps qs
| null ps || null qs = []
| otherwise = f (unsafeHead ps) (unsafeHead qs) : zipWith f (unsafeTail ps) (unsafeTail qs)
+{-# NOINLINE [1] zipWith #-}
--
-- | A specialised version of zipWith for the common case of a
More information about the Cvs-libraries
mailing list