addressbook/src/Data/Email.hs
Mats Rauhala 41c666fe93 Make the analysis parallel (#2)
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>
2021-10-29 22:41:46 +03:00

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