Commits

Bryan O'Sullivan committed 0dfa41b

Backport the fix for bug 19 to GHC < 7.2

  • Participants
  • Parent commits 44b54f4

Comments (0)

Files changed (3)

File Data/Text.hs

 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

File Data/Text/Fusion/Common.hs

                       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# #-}

File Data/Text/Lazy.hs

 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