summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2012-12-29 10:45:55 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2012-12-29 10:45:55 -0500
commitc431df57562913b0f8a80badcff3293354cea86e (patch)
tree57a5220c783e80dc4922f034e8ee3a2756255f10
parenta0405223def95a6d8238d4ac25c4ea8eb6523a0c (diff)
Get rid of unnecessary polymorphism
-rw-r--r--Data/OpenPGP.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs
index e0d0501..c9a7840 100644
--- a/Data/OpenPGP.hs
+++ b/Data/OpenPGP.hs
@@ -338,7 +338,7 @@ calculate_signature_trailer p@(SignaturePacket {version = 4}) =
338calculate_signature_trailer x = 338calculate_signature_trailer x =
339 error ("Trying to calculate signature trailer for: " ++ show x) 339 error ("Trying to calculate signature trailer for: " ++ show x)
340 340
341put_packet :: (Num a) => Packet -> (B.ByteString, a) 341put_packet :: Packet -> (B.ByteString, Word8)
342put_packet (SignaturePacket { version = v, 342put_packet (SignaturePacket { version = v,
343 unhashed_subpackets = unhashed_subpackets, 343 unhashed_subpackets = unhashed_subpackets,
344 key_algorithm = key_algorithm, 344 key_algorithm = key_algorithm,
@@ -418,8 +418,7 @@ put_packet (SecretKeyPacket { version = version, timestamp = timestamp,
418 where 418 where
419 (Just s2k_t) = s2k_type 419 (Just s2k_t) = s2k_type
420 p = fst (put_packet $ 420 p = fst (put_packet $
421 PublicKeyPacket version timestamp algorithm key False Nothing 421 PublicKeyPacket version timestamp algorithm key False Nothing)
422 :: (B.ByteString, Integer)) -- Supress warning
423 s = map (encode . (key !)) (secret_key_fields algorithm) 422 s = map (encode . (key !)) (secret_key_fields algorithm)
424put_packet p@(PublicKeyPacket { version = v, timestamp = timestamp, 423put_packet p@(PublicKeyPacket { version = v, timestamp = timestamp,
425 key_algorithm = algorithm, key = key, 424 key_algorithm = algorithm, key = key,