]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Chunk.hs
Use base64-bytestring instead of dataenc
[Lucu.git] / Network / HTTP / Lucu / Chunk.hs
index 9ad41f86786c0cdf15aed8c03717426356a88d1a..27deb740821f9c68bd5b3159c08469513c7c222d 100644 (file)
@@ -1,4 +1,3 @@
--- #hide
 module Network.HTTP.Lucu.Chunk
     ( chunkHeaderP  -- Num a => Parser a
     , chunkFooterP  -- Parser ()
@@ -14,18 +13,20 @@ import           Numeric
 
 chunkHeaderP :: Num a => Parser a
 chunkHeaderP = do hexLen <- many1 hexDigit
-                  extension
-                  crlf
+                  _      <- extension
+                  _      <- crlf
 
                   let [(len, _)] = readHex hexLen
                   return len
     where
       extension :: Parser ()
-      extension = do many $ do char ';'
-                               token
-                               char '='
-                               token <|> quotedStr
-                     return ()
+      extension = many ( char ';' >>
+                         token    >>
+                         char '=' >>
+                         ( token <|> quotedStr )
+                       )
+                  >>
+                  return ()
 {-# SPECIALIZE chunkHeaderP :: Parser Int #-}