summaryrefslogtreecommitdiff
path: root/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2012-07-27 23:48:27 -0400
committerClint Adams <clint@debian.org>2012-07-27 23:48:27 -0400
commitc708dc4b1d84bc85c52c5c3255f65c62a67ee039 (patch)
tree59dcc5dff95c2803e531e009bd411e85405ac5ee /Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs
parent3a9f6d91f4b1e36d92ea18237ae8caf1bb639203 (diff)
Make -Wall-clean and build with -Wall.
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs')
-rw-r--r--Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs
index 385074f..0334c7e 100644
--- a/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs
+++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Multipart.hs
@@ -13,11 +13,12 @@ import Data.ByteString.Lazy (ByteString)
13import qualified Data.ByteString.Lazy as BL 13import qualified Data.ByteString.Lazy as BL
14 14
15multipartMerge :: [Armor] -> Armor 15multipartMerge :: [Armor] -> Armor
16multipartMerge as = go as (Armor ArmorMessage [] BL.empty) 16multipartMerge 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 _ _ = error "This shouldn't happen."
21 go' :: ArmorType -> [(String,String)] -> ByteString -> Armor -> Armor 22 go' :: ArmorType -> [(String,String)] -> ByteString -> Armor -> Armor
22 go' (ArmorSplitMessage _ _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `BL.append` bs) 23 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 `BL.append` bs) 24 go' (ArmorSplitMessageIndefinite _) hs bs (Armor _ ohs obs) = Armor ArmorMessage (ohs ++ hs) (obs `BL.append` bs)