From 1ddca48c27cece9352e85ce6188f697eb9124750 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Thu, 26 Apr 2012 19:34:16 -0400 Subject: Introduce some lazy bytestrings internally. --- Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs') diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs index 014c8aa..dddecab 100644 --- a/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs +++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs @@ -5,13 +5,20 @@ module Codec.Encryption.OpenPGP.ASCIIArmor.Utils ( crlfUnlines + , crlfUnlinesLazy ) where import Data.ByteString (ByteString) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC8 +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BLC8 import Data.List (intersperse) crlfUnlines :: [ByteString] -> ByteString crlfUnlines [] = B.empty crlfUnlines ss = B.concat $ intersperse (BC8.pack "\r\n") ss + +crlfUnlinesLazy :: [BL.ByteString] -> BL.ByteString +crlfUnlinesLazy [] = BL.empty +crlfUnlinesLazy ss = BL.concat $ intersperse (BLC8.pack "\r\n") ss -- cgit v1.2.3