Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made to compile with ghc 7.4.1

  • Loading branch information...
commit c03f91e817c6ef4dac63bd01e1852acded4136ac 1 parent 6eba86f
@nikmikov nikmikov authored
View
2  Combinatorrent.cabal
@@ -18,7 +18,7 @@ author: Jesper Louis Andersen
maintainer: jesper.louis.andersen@gmail.com
stability: experimental
synopsis: A concurrent bittorrent client
-tested-with: GHC ==6.12.1, GHC ==6.12.2, GHC ==6.13.20100426
+tested-with: GHC ==6.12.1, GHC ==6.12.2, GHC ==6.13.20100426, GHC == 7.4.1
build-type: Configure
extra-tmp-files: src/Version.hs
View
1  src/Channels.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE FlexibleInstances #-}
module Channels
( Peer(..)
, PeerChokeMsg(..)
View
7 src/Digest.hs
@@ -7,15 +7,10 @@ module Digest
)
where
-import Control.Applicative
import Control.DeepSeq
-import Control.Monad.State
-import Data.Word
-
-import Foreign.Ptr
import qualified Data.ByteString as B
-import Data.ByteString.Unsafe
+
import qualified Data.ByteString.Lazy as L
import qualified Crypto.Hash.SHA1 as SHA1
View
2  src/Process/Peer.hs
@@ -29,7 +29,7 @@ import qualified Data.PieceSet as PS
import Data.Maybe
import Data.Monoid(Monoid(..), Last(..))
-import Data.Set as S hiding (map)
+import Data.Set as S hiding (map, foldl)
import Data.Time.Clock
import Data.Word
View
14 src/TestInstance.hs
@@ -4,13 +4,22 @@ module TestInstance
()
where
-import Data.Word
+
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
-import System.Random
+
import Test.QuickCheck
+
+{-# LANGUAGE CPP #-}
+#if MIN_VERSION_random(1,0,1)
+-- random>=1.0.1 is exporting these instances, so don't need to redefine it
+#else
+
+import Data.Word
+import System.Random
+
integralRandomR :: (Integral a, Integral b, RandomGen g, Num b) => (a, b) -> g -> (b, g)
integralRandomR (a,b) g = case randomR (c,d) g of
(x,h) -> (fromIntegral x, h)
@@ -24,6 +33,7 @@ instance Random Word32 where
instance Random Word8 where
randomR = integralRandomR
random = randomR (minBound, maxBound)
+#endif
instance Arbitrary L.ByteString where
arbitrary = L.pack `fmap` arbitrary
Please sign in to comment.
Something went wrong with that request. Please try again.