[Pkg-haskell-commits] darcs: haskell-hashed-storage: Add a Num constraint to the bytemask constant and functions which use bits; GHC 7.6 made an incompatible change — this was implicit before.
Iain Lane
iain at orangesquash.org.uk
Sat May 25 21:42:56 UTC 2013
Sat May 25 21:38:35 UTC 2013 Iain Lane <iain at orangesquash.org.uk>
* Add a Num constraint to the bytemask constant and functions which use bits; GHC 7.6 made an incompatible change [_\e2_][_\80_][_\94_] this was implicit before.
Ignore-this: 34b174b2647c70c509f78ac521a2f3c3
M ./changelog +8
A ./patches/
A ./patches/bits-num.patch
A ./patches/series
Sat May 25 21:38:35 UTC 2013 Iain Lane <iain at orangesquash.org.uk>
* Add a Num constraint to the bytemask constant and functions which use bits; GHC 7.6 made an incompatible change — this was implicit before.
Ignore-this: 34b174b2647c70c509f78ac521a2f3c3
diff -rN -u old-haskell-hashed-storage//changelog new-haskell-hashed-storage//changelog
--- old-haskell-hashed-storage//changelog 2013-05-25 21:42:56.357538108 +0000
+++ new-haskell-hashed-storage//changelog 2013-05-25 21:42:56.361545136 +0000
@@ -1,3 +1,11 @@
+haskell-hashed-storage (0.5.10-3) UNRELEASED; urgency=low
+
+ [ Iain Lane ]
+ * Add a Num constraint to the bytemask constant and functions which use
+ bits; GHC 7.6 made an incompatible change — this was implicit before.
+
+ -- Colin Watson <cjwatson at debian.org> Sat, 25 May 2013 22:32:55 +0100
+
haskell-hashed-storage (0.5.10-2) unstable; urgency=low
* Enable compat level 9
diff -rN -u old-haskell-hashed-storage//patches/bits-num.patch new-haskell-hashed-storage//patches/bits-num.patch
--- old-haskell-hashed-storage//patches/bits-num.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hashed-storage//patches/bits-num.patch 2013-05-25 21:42:56.365541030 +0000
@@ -0,0 +1,47 @@
+Description: Add a "Num" constraint to the bytemask constant and functions which use Bits
+ In GHC versions < 7.6.1 this was implicit, but it was removed.
+Author: Iain Lane <laney at debian.org>
+Forwarded: yes (email)
+
+Index: b/Storage/Hashed/Utils.hs
+===================================================================
+--- a/Storage/Hashed/Utils.hs
++++ b/Storage/Hashed/Utils.hs
+@@ -92,8 +92,8 @@
+ x -> i + boundary - x
+ {-# INLINE align #-}
+
+-xlate32 :: (Bits a) => a -> a
+-xlate64 :: (Bits a) => a -> a
++xlate32 :: (Num a, Bits a) => a -> a
++xlate64 :: (Num a, Bits a) => a -> a
+
+ #ifdef LITTLEENDIAN
+ xlate32 = id
+@@ -101,7 +101,7 @@
+ #endif
+
+ #ifdef BIGENDIAN
+-bytemask :: (Bits a) => a
++bytemask :: (Num a, Bits a) => a
+ bytemask = 255
+
+ xlate32 a = ((a .&. (bytemask `shift` 0)) `shiftL` 24) .|.
+Index: b/Storage/Hashed/Index.hs
+===================================================================
+--- a/Storage/Hashed/Index.hs
++++ b/Storage/Hashed/Index.hs
+@@ -152,11 +152,11 @@
+ itemIsDir i = unsafeHead (iDescriptor i) == c2w 'D'
+
+ -- xlatePeek32 = fmap xlate32 . peek
+-xlatePeek64 :: (Storable a, Bits a) => Ptr a -> IO a
++xlatePeek64 :: (Storable a, Num a, Bits a) => Ptr a -> IO a
+ xlatePeek64 = fmap xlate64 . peek
+
+ -- xlatePoke32 ptr v = poke ptr (xlate32 v)
+-xlatePoke64 :: (Storable a, Bits a) => Ptr a -> a -> IO ()
++xlatePoke64 :: (Storable a, Num a, Bits a) => Ptr a -> a -> IO ()
+ xlatePoke64 ptr v = poke ptr (xlate64 v)
+
+ -- | Lay out the basic index item structure in memory. The memory location is
diff -rN -u old-haskell-hashed-storage//patches/series new-haskell-hashed-storage//patches/series
--- old-haskell-hashed-storage//patches/series 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hashed-storage//patches/series 2013-05-25 21:42:56.369539595 +0000
@@ -0,0 +1 @@
+bits-num.patch
More information about the Pkg-haskell-commits
mailing list