Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Backport the fix for bug 19 to GHC < 7.2

  • Loading branch information...
commit 875fcccac661e6e3d265f7205cafd9078eefedbf 1 parent 2b2cb08
@bos authored
View
4 Data/Text.hs
@@ -222,7 +222,11 @@ import Data.ByteString (ByteString)
import qualified Data.Text.Lazy as L
import Data.Int (Int64)
#endif
+#if __GLASGOW_HASKELL__ >= 702
import qualified GHC.CString as GHC
+#else
+import qualified GHC.Base as GHC
+#endif
import GHC.Prim (Addr#)
-- $strict
View
2  Data/Text/Fusion/Common.hs
@@ -159,7 +159,7 @@ streamCString# addr = Stream step 0 unknownSize
in Yield c (i+4)
where b = I# (ord# b#)
next n = I# (ord# (at# (i+n))) - 0x80
- b# = at# i
+ !b# = at# i
at# (I# i#) = indexCharOffAddr# addr i#
chr (I# i#) = C# (chr# i#)
{-# INLINE [0] streamCString# #-}
View
4 Data/Text/Lazy.hs
@@ -217,7 +217,11 @@ import Data.Text.Lazy.Internal (Text(..), chunk, empty, foldlChunks, foldrChunks
import Data.Text.Internal (firstf, safe, textP)
import qualified Data.Text.Util as U
import Data.Text.Lazy.Search (indices)
+#if __GLASGOW_HASKELL__ >= 702
import qualified GHC.CString as GHC
+#else
+import qualified GHC.Base as GHC
+#endif
import GHC.Prim (Addr#)
-- $fusion

0 comments on commit 875fccc

Please sign in to comment.
Something went wrong with that request. Please try again.