packages feed

mime-directory 0.5 → 0.5.1

raw patch · 3 files changed

+39/−21 lines, 3 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Codec.MIME.ContentType.Text.Directory: instance (Eq u) => Eq (Value u)
- Codec.MIME.ContentType.Text.Directory: instance (PrintValue u) => PrintValue (Value u)
- Codec.MIME.ContentType.Text.Directory: instance (Show u) => Show (Property u)
- Codec.MIME.ContentType.Text.Directory: instance (Show u) => Show (Value u)
+ Codec.MIME.ContentType.Text.Directory: instance Eq u => Eq (Value u)
+ Codec.MIME.ContentType.Text.Directory: instance PrintValue u => PrintValue (Value u)
+ Codec.MIME.ContentType.Text.Directory: instance Show u => Show (Property u)
+ Codec.MIME.ContentType.Text.Directory: instance Show u => Show (Value u)
- Codec.MIME.ContentType.Text.Directory: printDirectory :: (PrintValue u) => Directory u -> ByteString
+ Codec.MIME.ContentType.Text.Directory: printDirectory :: PrintValue u => Directory u -> ByteString
- Codec.MIME.ContentType.Text.Directory: printDirectory' :: (PrintValue u) => [Property u] -> ByteString
+ Codec.MIME.ContentType.Text.Directory: printDirectory' :: PrintValue u => [Property u] -> ByteString
- Codec.MIME.ContentType.Text.Directory: printProperty :: (PrintValue u) => Property u -> ByteString
+ Codec.MIME.ContentType.Text.Directory: printProperty :: PrintValue u => Property u -> ByteString
- Codec.MIME.ContentType.Text.Directory: printValue :: (PrintValue a) => a -> ByteString
+ Codec.MIME.ContentType.Text.Directory: printValue :: PrintValue a => a -> ByteString

Files

Codec/MIME/ContentType/Text/Directory.hs view
@@ -1,4 +1,11 @@--- | Library for parsing and generating the text/directory mime content type.+-- |+-- Copyright   : (c) 2008 Mathieu Boespflug+-- License     : LGPL+-- Maintainer  : mboes@tweag.net+-- Stability   : experimental+-- Portability : non-portable+--+-- Library for parsing and generating the text/directory mime content type. -- This library implements all the required mechanisms in RFC 2425, which other -- libraries may use to implement parsing and generating specific profiles, -- such as vCard.@@ -105,17 +112,17 @@ -- | Break the input into logical lines, unfolding lines that span multiple -- physical lines. unfoldLines :: B.ByteString -> [B.ByteString]-unfoldLines "" = []-unfoldLines s = B.foldr f [B.empty] s-    where f '\r' (xs:xss) | Just (h1, xs') <- B.uncons xs,-                            Just (h2, xs'') <- B.uncons xs' =-                            case (h1, h2) of-                                ('\n', ' ') -> xs'':xss-                                ('\n', '\t') -> xs'':xss-                                ('\n', _) -> "":xs':xss-                                _ -> error "Malformed input: no LF after a CR."-                          | otherwise = "":xss-          f x (xs:xss) = B.cons x xs : xss+unfoldLines s | B.null s = []+              | otherwise = B.foldr f [B.empty] s where+    f '\r' (xs:xss) | Just (h1, xs') <- B.uncons xs,+                      Just (h2, xs'') <- B.uncons xs' =+                      case (h1, h2) of+                        ('\n', ' ') -> xs'':xss+                        ('\n', '\t') -> xs'':xss+                        ('\n', _) -> "":xs':xss+                        _ -> error "Malformed input: no LF after a CR."+                    | otherwise = "":xss+    f x ~(xs:xss) = B.cons x xs : xss  newtype P a = P { unP :: B.ByteString -> (a, B.ByteString) } @@ -310,7 +317,7 @@     printValue :: a -> B.ByteString  instance PrintValue u => PrintValue (Value u) where-    printValue (URI v) = showBS v+    printValue (URI v) = v     printValue (Text v) = escape "," $ v     printValue (Date v) = showBS v     printValue (Time v) = showBS v
Data/ByteString/Lazy/Char8/Caseless.hs view
@@ -7,12 +7,19 @@ import Data.Char (toLower) import GHC.Exts (IsString) import Data.Monoid (Monoid)-import Data.Generics.Basics (Data, Typeable) import Prelude hiding (concat)+#if defined(__GLASGOW_HASKELL__)+import Data.Typeable (Typeable)+import Data.Data (Data)+#endif  -- | Wrapper for case insensitive strings. newtype ByteString = I B.ByteString-    deriving (Data, Eq, IsString, Ord, Show, Monoid, Typeable)+    deriving ( Eq, Ord, Show, Monoid+#if defined(__GLASGOW_HASKELL__)+             , IsString, Data, Typeable+#endif+             )  -- | Inject a bytestring into a case insensitive bytestring. Note that the case -- of all letters in the ByteString is folded to lower case.
mime-directory.cabal view
@@ -1,7 +1,7 @@ name:           mime-directory-version:        0.5+version:        0.5.1 author:         Mathieu Boespflug-maintainer:     Mathieu Boespflug <mboes@tweag.net>+maintainer:     Mathieu Boespflug <mboes - at - tweag.net> homepage:       http://code.haskell.org/~mboes/mime-directory.git synopsis:       A library for parsing/printing the text/directory mime type. description:@@ -9,15 +9,19 @@ category:       Text license:        LGPL license-file:   LICENSE-copyright:      (c) 2008. Mathieu Boespflug <mboes@tweag.net>-cabal-version:  >= 1.2.0+copyright:      (c) 2008. Mathieu Boespflug <mboes - at - tweag.net>+cabal-version:  >= 1.6.0 build-type:     Simple tested-with:    GHC == 6.10  library-        build-depends:   base >= 3, bytestring >= 0.9, regex-pcre >= 0.94,+        build-depends:   base >= 3 && < 5, bytestring >= 0.9, regex-pcre >= 0.94,                          old-locale, time >= 1.1, containers, base64-string-        extensions:      OverloadedStrings, EmptyDataDecls, PatternGuards+        extensions:      CPP, OverloadedStrings, EmptyDataDecls, PatternGuards                          GeneralizedNewtypeDeriving, DeriveDataTypeable         exposed-modules: Codec.MIME.ContentType.Text.Directory                          Data.ByteString.Lazy.Char8.Caseless++source-repository head+  type:     git+  location: git://github.com/mboes/mime-directory