Skip to content
Browse files

Fix build problems with hashable >= 1.2

  • Loading branch information...
1 parent 1beaa41 commit cc635c1f156842c9f901699286f59e6dd7a184b4 @bos committed Dec 31, 2012
Showing with 10 additions and 12 deletions.
  1. +1 −0 lib/Network/HTTP/LoadTest/Analysis.hs
  2. +7 −10 lib/Network/HTTP/LoadTest/Types.hs
  3. +2 −2 pronk.cabal
View
1 lib/Network/HTTP/LoadTest/Analysis.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -fsimpl-tick-factor=150 #-}
{-# LANGUAGE BangPatterns, RecordWildCards #-}
module Network.HTTP.LoadTest.Analysis
View
17 lib/Network/HTTP/LoadTest/Types.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards,
- ScopedTypeVariables, ViewPatterns #-}
+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, OverloadedStrings,
+ RecordWildCards, ScopedTypeVariables, ViewPatterns #-}
module Network.HTTP.LoadTest.Types
(
@@ -22,19 +22,18 @@ import Control.Arrow (first)
import Control.DeepSeq (NFData(rnf))
import Control.Exception (Exception, IOException, SomeException, try)
import Data.Aeson.Types (Value(..), FromJSON(..), ToJSON(..), (.:), (.=), object)
-import Data.Bits (xor)
import Data.Conduit (ResourceT)
import Data.Data (Data)
-import Data.Hashable (Hashable(hash))
+import Data.Hashable (Hashable)
import Data.Typeable (Typeable)
import Network.HTTP.Conduit (Request(..), parseUrl)
+import GHC.Generics (Generic)
import System.IO.Unsafe
import qualified Data.ByteString.Char8 as B
import qualified Data.CaseInsensitive as CI
import qualified Data.Text as T
import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
-import Control.Monad.Trans.Resource (ResourceT)
newtype Req = Req {
fromReq :: Request (ResourceT IO)
@@ -118,11 +117,9 @@ data Event =
respCode :: {-# UNPACK #-} !Int
, respContentLength :: {-# UNPACK #-} !Int
} | Timeout
- deriving (Eq, Ord, Read, Show, Typeable, Data)
+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
-instance Hashable Event where
- hash Timeout = 0
- hash HttpResponse{..} = respCode `xor` respContentLength
+instance Hashable Event
instance ToJSON Event where
toJSON HttpResponse{..} = toJSON (respCode, respContentLength)
@@ -156,7 +153,7 @@ instance ToJSON Summary where
, "elapsed" .= summElapsed
, "event" .= summEvent
]
-
+
instance FromJSON Summary where
parseJSON (Object v) = Summary <$>
v .: "start" <*>
View
4 pronk.cabal
@@ -19,7 +19,7 @@ copyright: (c) 2011 Bryan O'Sullivan
category: Network
build-type: Simple
cabal-version: >=1.8
-extra-source-files:
+extra-source-files:
README.markdown
servers/ping/ping-servers.cabal
servers/ping/src/*.hs
@@ -55,7 +55,7 @@ library
criterion >= 0.6.0.0,
deepseq,
filepath,
- hashable >= 1.1.2.0,
+ hashable >= 1.2.0.2,
hastache,
http-conduit >= 1.6,
http-types,

0 comments on commit cc635c1

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