X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FMIMEType.hs;h=b7ceb4043fdd656173f9d503cbe9974c2fdf8547;hb=9ac730212cb361eb10e5fe4ad0eec6758e2b200a;hp=da4f503b33e838207e4cc27d380b302e21e79e87;hpb=078fc2851ceae061fe368f2bc09fcd16d67ae00f;p=Lucu.git diff --git a/Network/HTTP/Lucu/MIMEType.hs b/Network/HTTP/Lucu/MIMEType.hs index da4f503..b7ceb40 100644 --- a/Network/HTTP/Lucu/MIMEType.hs +++ b/Network/HTTP/Lucu/MIMEType.hs @@ -1,4 +1,4 @@ --- #prune +{-# OPTIONS_HADDOCK prune #-} -- |Manipulation of MIME Types. module Network.HTTP.Lucu.MIMEType @@ -13,6 +13,7 @@ import qualified Data.ByteString.Lazy as B import Network.HTTP.Lucu.Parser import Network.HTTP.Lucu.Parser.Http import Network.HTTP.Lucu.Utils +import Prelude hiding (min) -- |@'MIMEType' \"major\" \"minor\" [(\"name\", \"value\")]@ -- represents \"major\/minor; name=value\". @@ -54,18 +55,18 @@ parseMIMEType str = case parseStr mimeTypeP str of mimeTypeP :: Parser MIMEType mimeTypeP = allowEOF $! - do maj <- token - char '/' - min <- token + do maj <- token + _ <- char '/' + min <- token params <- many paramP return $ MIMEType maj min params where paramP :: Parser (String, String) - paramP = do many lws - char ';' - many lws - name <- token - char '=' + paramP = do _ <- many lws + _ <- char ';' + _ <- many lws + name <- token + _ <- char '=' value <- token <|> quotedStr return (name, value)