packages feed

mime 0.4.0 → 0.4.0.1

raw patch · 2 files changed

+11/−4 lines, 2 files

Files

Codec/MIME/Parse.hs view
@@ -26,6 +26,7 @@  import Codec.MIME.Type import Codec.MIME.Decode+import Control.Arrow(second)  import Data.Char import Data.Maybe@@ -245,12 +246,18 @@                 | otherwise = untilMatch a $ T.tail b  matchUntil :: T.Text -> T.Text -> (T.Text, T.Text)-matchUntil _   "" = ("", "")-matchUntil str xs+-- searching str; returning parts before str and after str+matchUntil str = second (T.drop $ T.length str) . T.breakOn str++{-+matchUntil' :: T.Text -> T.Text -> (T.Text, T.Text)+matchUntil' _   "" = ("", "")+matchUntil' str xs     | T.null xs = mempty     -- slow, but it'll do for now.     | str `T.isPrefixOf` xs = ("", T.drop (T.length str) xs)-    | otherwise = let (as,bs) = matchUntil str $ T.tail xs in (T.take 1 xs <> as, bs)+    | otherwise = let (as,bs) = matchUntil' str $ T.tail xs in (T.take 1 xs <> as, bs)+-}  isHSpace :: Char -> Bool isHSpace c = c == ' ' || c == '\t'
mime.cabal view
@@ -1,5 +1,5 @@ name:               mime-version:            0.4.0+version:            0.4.0.1 synopsis:           Working with MIME types. description:        Working with MIME types. category:           Codec