X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FMIMEType%2FGuess.hs;h=6a791e4d15792a5aaff5a4504ceb6e10930e7a22;hb=bb41be0c967538a1014c87103a3a5d3840ad3e15;hp=7c3c64d17816d6ef2aea5a73aba001dc4ce600b0;hpb=bb121f1189d01b5089aa5c29f0d390fad36ade48;p=Lucu.git diff --git a/Network/HTTP/Lucu/MIMEType/Guess.hs b/Network/HTTP/Lucu/MIMEType/Guess.hs index 7c3c64d..6a791e4 100644 --- a/Network/HTTP/Lucu/MIMEType/Guess.hs +++ b/Network/HTTP/Lucu/MIMEType/Guess.hs @@ -17,8 +17,8 @@ module Network.HTTP.Lucu.MIMEType.Guess ) where import Control.Applicative -import Data.Attoparsec.Char8 as P -import Data.Attoparsec.Lazy as LP +import Data.Attoparsec.Char8 +import qualified Data.Attoparsec.Lazy as LP import qualified Data.ByteString.Lazy.Char8 as Lazy import qualified Data.Map as M import Data.Map (Map) @@ -103,7 +103,7 @@ parseExtMap src "pair" ext ∷ Parser Text - ext = (decodeUtf8 <$> P.takeWhile1 isAlphaNum) + ext = (decodeUtf8 <$> takeWhile1 isAlphaNum) "ext" @@ -117,7 +117,7 @@ parseExtMap src "linebreak" compile ∷ Ord k ⇒ [(v, [k])] → Either (k, v, v) (Map k v) -compile = go (∅) ∘ concat ∘ map tr +compile = go (∅) ∘ concat ∘ (tr <$>) where tr ∷ (v, [k]) → [(k, v)] tr (v, ks) = [(k, v) | k ← ks]