]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/HttpVersion.hs
Optimized as possible as I can.
[Lucu.git] / Network / HTTP / Lucu / HttpVersion.hs
index 38d0e5b81ad49767621098c06bb499f347bae175..15ead365cdf6403a2e53eece4dbc117a1c8dcfef 100644 (file)
@@ -14,7 +14,7 @@ import           Network.HTTP.Lucu.Parser
 import           System.IO
 
 -- |@'HttpVersion' major minor@ represents \"HTTP\/major.minor\".
-data HttpVersion = HttpVersion Int Int
+data HttpVersion = HttpVersion !Int !Int
                    deriving (Eq)
 
 instance Show HttpVersion where
@@ -39,7 +39,8 @@ httpVersionP = do string "HTTP/"
 
 hPutHttpVersion :: Handle -> HttpVersion -> IO ()
 hPutHttpVersion h (HttpVersion maj min)
-    = do hPutStr  h "HTTP/"
+    = h `seq`
+      do hPutStr  h "HTTP/"
          hPutStr  h (show maj)
          hPutChar h '.'
          hPutStr  h (show min)
\ No newline at end of file