]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Preprocess.hs
Fixed build failure on recent GHC and other libraries
[Lucu.git] / Network / HTTP / Lucu / Preprocess.hs
index fc3fcbdfcde6cd01ce13cf36d3df3b44ddd9a45c..9f9fa0d68c3b83f187c6316213cc100f39cdc5cf 100644 (file)
@@ -1,3 +1,6 @@
+{-# LANGUAGE
+    BangPatterns
+  #-}
 module Network.HTTP.Lucu.Preprocess
     ( preprocess
     )
@@ -47,9 +50,8 @@ import           Network.URI
 -}
 
 preprocess :: Interaction -> STM ()
-preprocess itr
-    = itr `seq`
-      do req <- readItr itr itrRequest fromJust
+preprocess !itr
+    = do req <- readItr itr itrRequest fromJust
 
          let reqVer = reqVersion req
 
@@ -109,9 +111,8 @@ preprocess itr
 
 
       updateAuthority :: Strict.ByteString -> Strict.ByteString -> STM ()
-      updateAuthority host portStr
-          = host `seq` portStr `seq`
-            updateItr itr itrRequest
+      updateAuthority !host !portStr
+          = updateItr itr itrRequest
             $! \ (Just req) -> Just req {
                                  reqURI = let uri = reqURI req
                                           in uri {
@@ -125,9 +126,8 @@ preprocess itr
                 
 
       preprocessHeader :: Request -> STM ()
-      preprocessHeader req
-          = req `seq`
-            do case getHeader (C8.pack "Expect") req of
+      preprocessHeader !req
+          = do case getHeader (C8.pack "Expect") req of
                  Nothing    -> return ()
                  Just value -> if value `noCaseEq` C8.pack "100-continue" then
                                    writeItr itr itrExpectedContinue True