[Pkg-haskell-commits] darcs: haskell-crypto: Change class-constraints.diff patch

Joachim Breitner mail at joachim-breitner.de
Fri Oct 19 21:42:29 UTC 2012


Fri Oct 19 21:42:07 UTC 2012  Joachim Breitner <mail at joachim-breitner.de>
  * Change class-constraints.diff patch
  Ignore-this: c37577c5c6b300d9bd3a8330025ff412

    M ./patches/class-constraints.diff -26 +12

Fri Oct 19 21:42:07 UTC 2012  Joachim Breitner <mail at joachim-breitner.de>
  * Change class-constraints.diff patch
  Ignore-this: c37577c5c6b300d9bd3a8330025ff412
diff -rN -u old-haskell-crypto//patches/class-constraints.diff new-haskell-crypto//patches/class-constraints.diff
--- old-haskell-crypto//patches/class-constraints.diff	2012-10-19 21:42:29.699814025 +0000
+++ new-haskell-crypto//patches/class-constraints.diff	2012-10-19 21:42:29.707783253 +0000
@@ -2,30 +2,16 @@
  This patch has been emailed to upstream Caylee Hogg.
 Author: Clint Adams <clint at debian.org>
 
---- a/Data/Digest/SHA2.hs
-+++ b/Data/Digest/SHA2.hs
-@@ -106,7 +106,7 @@
- data Hash384 = Hash384 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 deriving (Eq, Ord)
- data Hash224 = Hash224 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 deriving (Eq, Ord)
+Index: haskell-crypto-4.2.5/Data/Digest/SHA2.hs
+===================================================================
+--- haskell-crypto-4.2.5.orig/Data/Digest/SHA2.hs	2012-10-19 23:38:06.092295145 +0200
++++ haskell-crypto-4.2.5/Data/Digest/SHA2.hs	2012-10-19 23:38:18.804294678 +0200
+@@ -25,7 +25,7 @@
+ ch x y z = (x .&. y) `xor` (complement x .&. z)
+ maj x y z = (x .&. y) `xor` (x .&. z) `xor` (y .&. z)
  
--instance (Integral a) => Show (Hash8 a) where
-+instance (Integral a, Show a) => Show (Hash8 a) where
-  showsPrec _ (Hash8 a b c d e f g h) =
-   (showHex a) . (' ':) .
-   (showHex b) . (' ':) .
-@@ -146,7 +146,7 @@
-      where
-       bs = bitSize (head r)
- 
--instance (Integral h, Bits h) => Hash (Hash8 h) where
-+instance (Integral h, Bits h, Show h) => Hash (Hash8 h) where
-   toOctets (Hash8 x0 x1 x2 x3 x4 x5 x6 x7) = bitsToOctets =<< [x0, x1, x2, x3, x4, x5, x6, x7]
- 
- instance Hash Hash384 where
-@@ -282,4 +282,4 @@
- 
- -- Test with:
- -- ghc -no-recomp -O --make Data/Digest/SHA2.hs -main-is Data.Digest.SHA2.moduleTest -o moduleTest && ./moduleTest && rm moduleTest
--moduleTest = runTestTT test_sha2
-\ No newline at end of file
-+moduleTest = runTestTT test_sha2
+-class (Bits w) => ShaData w where
++class (Bits w, Num w) => ShaData w where
+   bigSigma0 :: w -> w
+   bigSigma1 :: w -> w
+   smallSigma0 :: w -> w





More information about the Pkg-haskell-commits mailing list