summaryrefslogtreecommitdiff
path: root/Arbitrary.patch
blob: b003906e28f40a63e23769eb3b9ad063b2c64395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- Data/OpenPGP/Arbitrary.hs	2012-04-27 12:38:11.492411339 -0500
+++ arb.s	2012-04-27 12:37:57.176469214 -0500
@@ -19,8 +19,7 @@
                            x6 <- arbitrary
                            x7 <- arbitrary
                            x8 <- arbitrary
-                           x9 <- arbitrary
-                           return (SignaturePacket x1 x2 x3 x4 x5 x6 x7 x8 x9)
+                           return (signaturePacket x1 x2 x3 x4 x5 x6 x7 x8)
                    1 -> do x1 <- arbitrary
                            x2 <- arbitrary
                            x3 <- arbitrary
@@ -116,7 +115,7 @@

 instance Arbitrary MPI where
         arbitrary
-          = do x1 <- arbitrary
+          = do x1 <- suchThat arbitrary (>=0)
                return (MPI x1)


                    _ -> error "FATAL ERROR: Arbitrary instance, logic bug"
@@ -140 +139 @@
-                   6 -> do x1 <- arbitrary
+                   6 -> do x1 <- fmap (map toUpper . (`showHex` "")) (arbitrary :: Gen Word64)
@@ -143,2 +142 @@
-                           x2 <- arbitrary
-                           return (UnsupportedSignatureSubpacket x1 x2)
+                           return (UnsupportedSignatureSubpacket 105 x1)