diff options
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs')
-rw-r--r-- | Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs index 8719c7c..313c3bc 100644 --- a/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs +++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs | |||
@@ -9,16 +9,16 @@ module Codec.Encryption.OpenPGP.ASCIIArmor.Multipart ( | |||
9 | 9 | ||
10 | import Codec.Encryption.OpenPGP.ASCIIArmor.Types | 10 | import Codec.Encryption.OpenPGP.ASCIIArmor.Types |
11 | 11 | ||
12 | import Data.ByteString (ByteString) | 12 | import Data.ByteString.Lazy (ByteString) |
13 | import qualified Data.ByteString as B | 13 | import qualified Data.ByteString.Lazy as BL |
14 | 14 | ||
15 | multipartMerge :: [Armor] -> Armor | 15 | multipartMerge :: [Armor] -> Armor |
16 | multipartMerge as = go as (Armor ArmorMessage [] B.empty) | 16 | multipartMerge as = go as (Armor ArmorMessage [] BL.empty) |
17 | where | 17 | where |
18 | go :: [Armor] -> Armor -> Armor | 18 | go :: [Armor] -> Armor -> Armor |
19 | go [] state = state | 19 | go [] state = state |
20 | go ((Armor at hs bs):as) state = go as (go' at hs bs state) | 20 | go ((Armor at hs bs):as) state = go as (go' at hs bs state) |
21 | go' :: ArmorType -> [(String,String)] -> ByteString -> Armor -> Armor | 21 | go' :: ArmorType -> [(String,String)] -> ByteString -> Armor -> Armor |
22 | go' (ArmorSplitMessage _ _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `B.append` bs) | 22 | go' (ArmorSplitMessage _ _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `BL.append` bs) |
23 | go' (ArmorSplitMessageIndefinite _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `B.append` bs) | 23 | go' (ArmorSplitMessageIndefinite _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `BL.append` bs) |
24 | go' _ _ _ state = state | 24 | go' _ _ _ state = state |