{-# 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