X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FChunk.hs;h=b48727cc0f364fdbe3037cd759cbbf01476216a4;hb=ece223c;hp=a419464eefbc322989141167b8d4cbf8bcc741db;hpb=e34910f85f459f049b9e6e6b79db9ef95dfccc13;p=Lucu.git diff --git a/Network/HTTP/Lucu/Chunk.hs b/Network/HTTP/Lucu/Chunk.hs index a419464..b48727c 100644 --- a/Network/HTTP/Lucu/Chunk.hs +++ b/Network/HTTP/Lucu/Chunk.hs @@ -2,9 +2,9 @@ UnicodeSyntax #-} module Network.HTTP.Lucu.Chunk - ( chunkHeaderP -- Num a => Parser a - , chunkFooterP -- Parser () - , chunkTrailerP -- Parser Headers + ( chunkHeaderP + , chunkFooterP + , chunkTrailerP ) where import Control.Applicative @@ -21,12 +21,11 @@ chunkHeaderP = do len ← hexadecimal return len where extension ∷ Parser () - extension = skipMany $ - do _ ← char ';' - _ ← token - _ ← char '=' - _ ← token <|> quotedStr - return () + extension + = skipMany ( char ';' *> + token *> + char '=' *> + (token <|> quotedStr) ) chunkFooterP ∷ Parser () chunkFooterP = crlf