HackMail.Data.Deliverable
Description
Author : Joe Fredette License : BSD3 Copyright : Joe Fredette
Maintainer : Joe Fredette jfredett.at.gmail.dot.com Stability : Unstable Portability : Portable
- class Typeable a => Deliverable a where
- data DEMail = DE {}
- newtype FlatEmail = Flat DEMail
- newtype MaildirEmail = MD DEMail
- getDeliveryPath :: DEMail -> FilePath
- data ToDelivery where
- Wrap :: Deliverable a => a -> ToDelivery
- delivery :: ToDelivery -> IO ()
Documentation
class Typeable a => Deliverable a whereSource
The main class which abstracts over delivery of datatype to somewhere in the file system. It also abstracts over construction. Due to some weirdity w.r.t. Hint, this, and all instancing datatypes, must derive Typeable. A bit of boilerplate, but deriving generally handles it easily.
Instances
newtype MaildirEmail Source
delivery :: ToDelivery -> IO ()Source