Mats Rauhala
41c666fe93
Co-authored-by: Mats Rauhala <mats.rauhala@iki.fi> Reviewed-on: #2 Co-authored-by: Mats Rauhala <masse@rauhala.info> Co-committed-by: Mats Rauhala <masse@rauhala.info>
14 lines
339 B
Haskell
14 lines
339 B
Haskell
{-# LANGUAGE TypeApplications #-}
|
|
module Data.Email where
|
|
|
|
import Data.Email.Header
|
|
|
|
import Conduit
|
|
import qualified Data.Conduit.Combinators as C
|
|
|
|
import Data.ByteString
|
|
(ByteString)
|
|
|
|
parseEmail :: (MonadUnliftIO m, MonadThrow m, Monad m) => ConduitM ByteString Header m ()
|
|
parseEmail = C.linesUnboundedAscii .| C.concatMap decode
|