1 |
gienah 15/01/03 02:28:30 |
2 |
|
3 |
Added: darcs-2.8.5-ghc-7.10.patch |
4 |
Log: |
5 |
Patch darcs-2.8.5 for ghc 7.10 |
6 |
|
7 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 618E971F) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-vcs/darcs/files/darcs-2.8.5-ghc-7.10.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/files/darcs-2.8.5-ghc-7.10.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/files/darcs-2.8.5-ghc-7.10.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: darcs-2.8.5-ghc-7.10.patch |
16 |
=================================================================== |
17 |
--- darcs-2.8.5-orig/src/Darcs/Repository/Internal.hs 2014-08-26 06:27:34.000000000 +1000 |
18 |
+++ darcs-2.8.5/src/Darcs/Repository/Internal.hs 2015-01-03 12:18:03.576529408 +1100 |
19 |
@@ -71,8 +71,8 @@ |
20 |
writeProblem, readProblem, readfromAndWritetoProblem ) |
21 |
import System.Directory ( doesDirectoryExist, setCurrentDirectory, |
22 |
createDirectoryIfMissing, doesFileExist ) |
23 |
-import Control.Monad ( when, unless, filterM ) |
24 |
-import Control.Applicative ( (<$>) ) |
25 |
+import Control.Monad ( when, unless, filterM, ap ) |
26 |
+import Control.Applicative ( Applicative(..), (<$>) ) |
27 |
import Control.Exception ( catch, IOException ) |
28 |
|
29 |
import Workaround ( getCurrentDirectory, renameFile, setExecutable ) |
30 |
@@ -184,6 +184,10 @@ |
31 |
instance Functor (RIO p C(r u t t)) where |
32 |
fmap f m = RIO $ \r -> fmap f (unsafeUnRIO m r) |
33 |
|
34 |
+instance Applicative (RIO p C(r u t t)) where |
35 |
+ pure = return |
36 |
+ (<*>) = ap |
37 |
+ |
38 |
-- | We have an instance of Monad so that IO actions that do not |
39 |
-- change the tentative recorded state are convenient in the IO monad. |
40 |
instance Monad (RIO p C(r u t t)) where |
41 |
--- darcs-2.8.5-orig/src/Darcs/Patch/Prim/V1/Commute.hs 2014-08-26 06:27:34.000000000 +1000 |
42 |
+++ darcs-2.8.5/src/Darcs/Patch/Prim/V1/Commute.hs 2015-01-03 12:11:31.281425244 +1100 |
43 |
@@ -6,7 +6,8 @@ |
44 |
where |
45 |
|
46 |
import Prelude hiding ( pi ) |
47 |
-import Control.Monad ( MonadPlus, msum, mzero, mplus ) |
48 |
+import Control.Applicative ( Applicative(..), Alternative(..) ) |
49 |
+import Control.Monad ( MonadPlus, msum, mzero, mplus, liftM, ap ) |
50 |
|
51 |
import qualified Data.ByteString as B (ByteString, concat) |
52 |
import qualified Data.ByteString.Char8 as BC (pack) |
53 |
@@ -35,6 +36,17 @@ |
54 |
|
55 |
data Perhaps a = Unknown | Failed | Succeeded a |
56 |
|
57 |
+instance Functor Perhaps where |
58 |
+ fmap = liftM |
59 |
+ |
60 |
+instance Applicative Perhaps where |
61 |
+ pure = return |
62 |
+ (<*>) = ap |
63 |
+ |
64 |
+instance Alternative Perhaps where |
65 |
+ (<|>) = mplus |
66 |
+ empty = mzero |
67 |
+ |
68 |
instance Monad Perhaps where |
69 |
(Succeeded x) >>= k = k x |
70 |
Failed >>= _ = Failed |
71 |
--- darcs-2.8.5-orig/src/Darcs/IO.hs 2014-08-26 06:27:34.000000000 +1000 |
72 |
+++ darcs-2.8.5/src/Darcs/IO.hs 2015-01-03 12:06:40.423103022 +1100 |
73 |
@@ -23,6 +23,7 @@ |
74 |
import Data.Char ( toLower ) |
75 |
import Data.List ( isSuffixOf ) |
76 |
import System.IO.Error ( isDoesNotExistError, isPermissionError ) |
77 |
+import Control.Applicative ( Applicative(..) ) |
78 |
import Control.Exception.Extensible ( catch, SomeException, IOException ) |
79 |
import Control.Monad.Error |
80 |
import System.Directory ( createDirectory, |
81 |
@@ -97,6 +98,10 @@ |
82 |
instance Functor TolerantIO where |
83 |
fmap f m = m >>= return . f |
84 |
|
85 |
+instance Applicative TolerantIO where |
86 |
+ pure = return |
87 |
+ (<*>) = ap |
88 |
+ |
89 |
instance Monad TolerantIO where |
90 |
f >>= g = runTM $ runIO f >>= runIO . g |
91 |
f >> g = runTM $ runIO f >> runIO g |
92 |
@@ -106,6 +111,10 @@ |
93 |
instance Functor SilentIO where |
94 |
fmap f m = m >>= return . f |
95 |
|
96 |
+instance Applicative SilentIO where |
97 |
+ pure = return |
98 |
+ (<*>) = ap |
99 |
+ |
100 |
instance Monad SilentIO where |
101 |
f >>= g = runTM $ runIO f >>= runIO . g |
102 |
f >> g = runTM $ runIO f >> runIO g |
103 |
--- darcs-2.8.5-orig/src/Darcs/Patch/V2/Real.hs 2014-08-26 06:27:34.000000000 +1000 |
104 |
+++ darcs-2.8.5/src/Darcs/Patch/V2/Real.hs 2015-01-03 11:14:40.109221505 +1100 |
105 |
@@ -29,6 +29,9 @@ |
106 |
, mergeUnravelled |
107 |
) where |
108 |
|
109 |
+#if MIN_VERSION_base(4,8,0) |
110 |
+import Prelude hiding ( (*>) ) |
111 |
+#endif |
112 |
import Control.Monad ( mplus, liftM ) |
113 |
import qualified Data.ByteString.Char8 as BC ( ByteString, pack ) |
114 |
import Data.Maybe ( fromMaybe ) |
115 |
--- darcs-2.8.5-orig/src/Darcs/Patch/V2/Non.hs 2014-08-26 06:27:34.000000000 +1000 |
116 |
+++ darcs-2.8.5/src/Darcs/Patch/V2/Non.hs 2015-01-03 11:14:08.073788136 +1100 |
117 |
@@ -40,7 +40,11 @@ |
118 |
, (>>*) |
119 |
) where |
120 |
|
121 |
+#if MIN_VERSION_base(4,8,0) |
122 |
+import Prelude hiding ( rem, (*>) ) |
123 |
+#else |
124 |
import Prelude hiding ( rem ) |
125 |
+#endif |
126 |
import Data.List ( delete ) |
127 |
import Control.Monad ( liftM, mzero ) |
128 |
import Darcs.Patch.Commute ( commuteFL ) |
129 |
--- darcs-2.8.5-orig/src/Darcs/Patch/V1/Commute.hs 2014-08-26 06:27:34.000000000 +1000 |
130 |
+++ darcs-2.8.5/src/Darcs/Patch/V1/Commute.hs 2015-01-03 12:11:47.084707544 +1100 |
131 |
@@ -28,7 +28,8 @@ |
132 |
) |
133 |
where |
134 |
|
135 |
-import Control.Monad ( MonadPlus, mplus, msum, mzero, guard ) |
136 |
+import Control.Applicative ( Applicative(..), Alternative(..) ) |
137 |
+import Control.Monad ( MonadPlus, mplus, msum, mzero, guard, liftM, ap ) |
138 |
|
139 |
import Darcs.Patch.Commute ( toFwdCommute ) |
140 |
import Darcs.Patch.ConflictMarking ( mangleUnravelled ) |
141 |
@@ -69,6 +70,17 @@ |
142 |
|
143 |
data Perhaps a = Unknown | Failed | Succeeded a |
144 |
|
145 |
+instance Functor Perhaps where |
146 |
+ fmap = liftM |
147 |
+ |
148 |
+instance Applicative Perhaps where |
149 |
+ pure = return |
150 |
+ (<*>) = ap |
151 |
+ |
152 |
+instance Alternative Perhaps where |
153 |
+ (<|>) = mplus |
154 |
+ empty = mzero |
155 |
+ |
156 |
instance Monad Perhaps where |
157 |
(Succeeded x) >>= k = k x |
158 |
Failed >>= _ = Failed |