mime-mail 0.5.0 → 0.5.1
raw patch · 3 files changed
+16/−11 lines, 3 files
Files
- ChangeLog.md +4/−0
- Network/Mail/Mime.hs +8/−7
- mime-mail.cabal +4/−4
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.5.1++* Add `Generic` instances for types used in `Mail`+ ## 0.5 * Add support for inline images and multipart/related
Network/Mail/Mime.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, OverloadedStrings, RecordWildCards #-}+{-# LANGUAGE CPP, DeriveGeneric, OverloadedStrings, RecordWildCards #-} module Network.Mail.Mime ( -- * Datatypes Boundary (..)@@ -71,6 +71,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as TE+import GHC.Generics (Generic) -- | Generates a random sequence of alphanumerics of the given length. randomString :: RandomGen d => Int -> d -> (String, d)@@ -110,7 +111,7 @@ -- version last. , mailParts :: [Alternatives] }- deriving Show+ deriving (Show, Generic) -- | A mail message with the provided 'from' address and no other -- fields filled in.@@ -128,14 +129,14 @@ { addressName :: Maybe Text , addressEmail :: Text }- deriving (Eq, Show)+ deriving (Eq, Show, Generic) instance IsString Address where fromString = Address Nothing . Data.String.fromString -- | How to encode a single part. You should use 'Base64' for binary data. data Encoding = None | Base64 | QuotedPrintableText | QuotedPrintableBinary- deriving (Eq, Show)+ deriving (Eq, Show, Generic) -- | Multiple alternative representations of the same data. For example, you -- could provide a plain-text and HTML version of a message.@@ -151,16 +152,16 @@ , partHeaders :: Headers , partContent :: PartContent }- deriving (Eq, Show)+ deriving (Eq, Show, Generic) -- | NestedParts are for multipart-related: One HTML part and some inline images data PartContent = PartContent L.ByteString | NestedParts [Part]- deriving (Eq, Show)+ deriving (Eq, Show, Generic) data Disposition = AttachmentDisposition Text | InlineDisposition Text | DefaultDisposition- deriving (Show, Eq)+ deriving (Show, Eq, Generic) type Headers = [(S.ByteString, Text)]
mime-mail.cabal view
@@ -1,5 +1,6 @@+Cabal-version: >=1.10 Name: mime-mail-Version: 0.5.0+Version: 0.5.1 Synopsis: Compose MIME email messages. description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/mime-mail>. Homepage: http://github.com/snoyberg/mime-mail@@ -12,11 +13,9 @@ extra-source-files: README.md ChangeLog.md --- Constraint on the version of Cabal needed to build this package.-Cabal-version: >=1.8 - Library+ default-language: Haskell2010 Exposed-modules: Network.Mail.Mime Build-depends: base >= 4.9 && < 5 , base64-bytestring >= 0.1@@ -28,6 +27,7 @@ , filepath >= 1.2 test-suite tests+ default-language: Haskell2010 type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: Network.Mail.MimeSpec