]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/ETag.hs
Fixed breakage on GHC 6.10.1
[Lucu.git] / Network / HTTP / Lucu / ETag.hs
index bdb1473786a001fa016f9e4b8440892c5220060f..d607ad12db4d2fa22ec529a2f0456f9c7e4644f7 100644 (file)
@@ -1,4 +1,4 @@
--- #prune
+{-# OPTIONS_HADDOCK prune #-}
 
 -- |Manipulation of entity tags.
 module Network.HTTP.Lucu.ETag
@@ -12,17 +12,17 @@ module Network.HTTP.Lucu.ETag
 
 import           Control.Monad
 import           Network.HTTP.Lucu.Parser
-import           Network.HTTP.Lucu.Parser.Http
+import           Network.HTTP.Lucu.Parser.Http hiding (token)
 import           Network.HTTP.Lucu.Utils
 
 -- |An entity tag is made of a weakness flag and a opaque string.
 data ETag = ETag {
       -- |The weakness flag. Weak tags looks like W\/\"blahblah\" and
       -- strong tags are like \"blahblah\".
-      etagIsWeak :: Bool
+      etagIsWeak :: !Bool
       -- |An opaque string. Only characters from 0x20 (sp) to 0x7e (~)
       -- are allowed.
-    , etagToken  :: String
+    , etagToken  :: !String
     } deriving (Eq)
 
 instance Show ETag where
@@ -33,13 +33,13 @@ instance Show ETag where
                                ++
                                quoteStr token
 
--- |This is an equivalent to @'ETag' False@. If you want to generate
--- an ETag from a file, try using
+-- |This is equivalent to @'ETag' 'Prelude.False'@. If you want to
+-- generate an ETag from a file, try using
 -- 'Network.HTTP.Lucu.StaticFile.generateETagFromFile'.
 strongETag :: String -> ETag
 strongETag = ETag False
 
--- |This is an equivalent to @'ETag' True@.
+-- |This is equivalent to @'ETag' 'Prelude.True'@.
 weakETag :: String -> ETag
 weakETag = ETag True
 
@@ -52,7 +52,7 @@ eTagP = do isWeak <- option False (string "W/" >> return True)
 
 eTagListP :: Parser [ETag]
 eTagListP = allowEOF
-            $ do xs <- listOf eTagP
-                 when (null xs)
-                          $ fail ""
-                 return xs
+            $! do xs <- listOf eTagP
+                  when (null xs)
+                           $ fail ""
+                  return xs