1 |
gienah 12/12/28 05:47:39 |
2 |
|
3 |
Added: agda-2.3.2-hashable-1.2.patch |
4 |
Log: |
5 |
Loosen binary dep, patch for hashable 1.2 |
6 |
|
7 |
(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key 618E971F) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-mathematics/agda/files/agda-2.3.2-hashable-1.2.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/agda/files/agda-2.3.2-hashable-1.2.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/agda/files/agda-2.3.2-hashable-1.2.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: agda-2.3.2-hashable-1.2.patch |
16 |
=================================================================== |
17 |
--- Agda-2.3.2-orig/src/full/Agda/Syntax/Abstract/Name.hs 2012-11-12 11:25:21.000000000 +1100 |
18 |
+++ Agda-2.3.2/src/full/Agda/Syntax/Abstract/Name.hs 2012-12-18 22:10:22.241674353 +1100 |
19 |
@@ -239,8 +239,13 @@ |
20 |
show x = show (nameConcrete x) -- ++ "|" ++ show (nameId x) |
21 |
|
22 |
instance Hashable Name where |
23 |
+#if MIN_VERSION_hashable(1,2,0) |
24 |
+ {-# INLINE hashWithSalt #-} |
25 |
+ hashWithSalt salt = (hashWithSalt salt) . nameId |
26 |
+#else |
27 |
{-# INLINE hash #-} |
28 |
hash = hash . nameId |
29 |
+#endif |
30 |
|
31 |
instance Show QName where |
32 |
show q = concat $ intersperse "." $ map show $ qnameToList q |
33 |
@@ -255,8 +260,13 @@ |
34 |
compare = compare `on` qnameName |
35 |
|
36 |
instance Hashable QName where |
37 |
+#if MIN_VERSION_hashable(1,2,0) |
38 |
+ {-# INLINE hashWithSalt #-} |
39 |
+ hashWithSalt salt = (hashWithSalt salt) . qnameName |
40 |
+#else |
41 |
{-# INLINE hash #-} |
42 |
hash = hash . qnameName |
43 |
+#endif |
44 |
|
45 |
instance HasRange Name where |
46 |
getRange = getRange . nameConcrete |
47 |
--- Agda-2.3.2-orig/src/full/Agda/Syntax/Common.hs 2012-11-12 11:25:21.000000000 +1100 |
48 |
+++ Agda-2.3.2/src/full/Agda/Syntax/Common.hs 2012-12-18 22:11:29.730050687 +1100 |
49 |
@@ -272,8 +272,13 @@ |
50 |
fromEnum (NameId n _) = fromIntegral n |
51 |
|
52 |
instance Hashable NameId where |
53 |
+#if MIN_VERSION_hashable(1,2,0) |
54 |
+ {-# INLINE hashWithSalt #-} |
55 |
+ hashWithSalt salt (NameId n m) = hashWithSalt salt (n, m) |
56 |
+#else |
57 |
{-# INLINE hash #-} |
58 |
hash (NameId n m) = hash (n, m) |
59 |
+#endif |
60 |
|
61 |
newtype Constr a = Constr a |
62 |
|
63 |
--- Agda-2.3.2-orig/src/full/Agda/Utils/Pointer.hs 2012-11-12 11:25:22.000000000 +1100 |
64 |
+++ Agda-2.3.2/src/full/Agda/Utils/Pointer.hs 2012-12-18 22:12:18.834049775 +1100 |
65 |
@@ -1,4 +1,4 @@ |
66 |
-{-# LANGUAGE DeriveDataTypeable #-} |
67 |
+{-# LANGUAGE DeriveDataTypeable, CPP #-} |
68 |
module Agda.Utils.Pointer |
69 |
( Ptr, newPtr, derefPtr, setPtr |
70 |
, updatePtr, updatePtrM |
71 |
@@ -71,7 +71,11 @@ |
72 |
compare = compare `on` ptrTag |
73 |
|
74 |
instance Hashable (Ptr a) where |
75 |
+#if MIN_VERSION_hashable(1,2,0) |
76 |
+ hashWithSalt salt = (hashWithSalt salt) . ptrTag |
77 |
+#else |
78 |
hash = hash . ptrTag |
79 |
+#endif |
80 |
|
81 |
instance NFData (Ptr a) where |