Permalink
Browse files

more fixes for GHC 7.4.1

  • Loading branch information...
1 parent 5ad45ef commit a9e8be1e8bfea915f813a6e49e453c4efd6923e1 @simonmar committed Feb 26, 2013
Showing with 24 additions and 7 deletions.
  1. +13 −0 ByteStringCompat.hs
  2. +7 −7 parconc-examples.cabal
  3. +1 −0 rsa-pipeline.hs
  4. +1 −0 rsa.hs
  5. +1 −0 rsa1.hs
  6. +1 −0 rsa2.hs
View
@@ -0,0 +1,13 @@
+{-# LANGUAGE CPP #-}
+module ByteStringCompat () where
+
+import qualified Data.ByteString.Lazy.Char8 as B
+import Data.ByteString.Lazy.Char8 (ByteString)
+import Control.DeepSeq
+
+#if !MIN_VERSION_bytestring(0,10,0)
+
+instance NFData ByteString where
+ rnf x = B.length x `seq` ()
+
+#endif
@@ -52,24 +52,25 @@ executable sudoku4
executable rsa
main-is: rsa.hs
build-depends: base >= 4.5 && < 4.7
- , bytestring >= 0.10 && < 0.11
+ , bytestring >= 0.9 && < 0.11
+ , deepseq ==1.3.*
default-language: Haskell2010
executable rsa1
main-is: rsa1.hs
build-depends: base >= 4.5 && < 4.7
- , bytestring >= 0.10 && < 0.11
- -- bytestring-0.10 needed to get instance NFData ByteString
+ , bytestring >= 0.9 && < 0.11
, parallel ==3.2.*
+ , deepseq ==1.3.*
ghc-options: -threaded
default-language: Haskell2010
executable rsa2
main-is: rsa2.hs
build-depends: base >= 4.5 && < 4.7
- , bytestring >= 0.10 && < 0.11
- -- bytestring-0.10 needed to get instance NFData ByteString
+ , bytestring >= 0.9 && < 0.11
, parallel ==3.2.*
+ , deepseq ==1.3.*
ghc-options: -threaded
default-language: Haskell2010
@@ -116,8 +117,7 @@ executable parmonad
executable rsa-pipeline
main-is: rsa-pipeline.hs
build-depends: base >= 4.5 && < 4.7
- , bytestring >= 0.10 && < 0.11
- -- bytestring-0.10 needed to get instance NFData ByteString
+ , bytestring >= 0.9 && < 0.11
, monad-par >= 0.3.4 && < 0.4
, deepseq ==1.3.*
ghc-options: -threaded
View
@@ -8,6 +8,7 @@ import System.Environment
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
+import ByteStringCompat
import Control.Monad.Par.Scheds.Trace
import Stream
View
@@ -8,6 +8,7 @@ import System.Environment
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
+import ByteStringCompat
main = do
[cmd,f] <- getArgs
View
@@ -9,6 +9,7 @@ import Control.Parallel.Strategies
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
+import ByteStringCompat
main = do
[cmd,f] <- getArgs
View
@@ -9,6 +9,7 @@ import Control.Parallel.Strategies
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
+import ByteStringCompat
main = do
[cmd,f] <- getArgs

0 comments on commit a9e8be1

Please sign in to comment.