]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/MIMEType/Guess.hs
Code clean-up using convertible-text.
[Lucu.git] / Network / HTTP / Lucu / MIMEType / Guess.hs
index 7c3c64d17816d6ef2aea5a73aba001dc4ce600b0..6a791e4d15792a5aaff5a4504ceb6e10930e7a22 100644 (file)
@@ -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]