1 |
commit: 0717357c42231dfd1ee249f67cbc4a454704ce46 |
2 |
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jul 26 16:46:59 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 3 07:21:54 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0717357c |
7 |
|
8 |
dev-haskell/happstack-server: remove unused patches |
9 |
|
10 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
11 |
|
12 |
.../files/happstack-server-7.4.2-ghc-7.10.patch | 58 ------ |
13 |
.../files/happstack-server-7.4.2-time-1.5.patch | 225 --------------------- |
14 |
2 files changed, 283 deletions(-) |
15 |
|
16 |
diff --git a/dev-haskell/happstack-server/files/happstack-server-7.4.2-ghc-7.10.patch b/dev-haskell/happstack-server/files/happstack-server-7.4.2-ghc-7.10.patch |
17 |
deleted file mode 100644 |
18 |
index 42d95ff..0000000 |
19 |
--- a/dev-haskell/happstack-server/files/happstack-server-7.4.2-ghc-7.10.patch |
20 |
+++ /dev/null |
21 |
@@ -1,58 +0,0 @@ |
22 |
---- happstack-server-7.4.2-orig/src/Happstack/Server/Internal/Monads.hs 2015-03-24 03:34:11.000000000 +1100 |
23 |
-+++ happstack-server-7.4.2/src/Happstack/Server/Internal/Monads.hs 2015-04-04 15:20:58.273008986 +1100 |
24 |
-@@ -173,7 +173,7 @@ |
25 |
- instance MonadTrans (ServerPartT) where |
26 |
- lift m = withRequest (\_ -> lift m) |
27 |
- |
28 |
--instance (Monad m) => Monoid (ServerPartT m a) where |
29 |
-+instance (Monad m, MonadPlus m) => Monoid (ServerPartT m a) where |
30 |
- mempty = mzero |
31 |
- mappend = mplus |
32 |
- |
33 |
-@@ -486,7 +486,7 @@ |
34 |
- instance MonadTrans WebT where |
35 |
- lift = WebT . lift . lift . lift |
36 |
- |
37 |
--instance (Monad m) => MonadPlus (WebT m) where |
38 |
-+instance (Monad m, MonadPlus m) => MonadPlus (WebT m) where |
39 |
- -- | Aborts a computation. |
40 |
- -- |
41 |
- -- This is primarily useful because 'msum' will take an array of |
42 |
-@@ -505,7 +505,7 @@ |
43 |
- lft (Left r, _) = Left r |
44 |
- lft (Right a, f) = Right (a, f) |
45 |
- |
46 |
--instance (Monad m) => Monoid (WebT m a) where |
47 |
-+instance (Monad m, MonadPlus m) => Monoid (WebT m a) where |
48 |
- mempty = mzero |
49 |
- mappend = mplus |
50 |
- |
51 |
-@@ -561,7 +561,7 @@ |
52 |
- liftWebT (Just (Right x,f)) = pass (return x)>>= (\a -> return $ Just (Right a,f)) |
53 |
- |
54 |
- -- | Deprecated: use 'msum'. |
55 |
--multi :: Monad m => [ServerPartT m a] -> ServerPartT m a |
56 |
-+multi :: (Monad m, MonadPlus m) => [ServerPartT m a] -> ServerPartT m a |
57 |
- multi = msum |
58 |
- {-# DEPRECATED multi "Use msum instead" #-} |
59 |
- |
60 |
---- happstack-server-7.4.2-orig/src/Happstack/Server/RqData.hs 2015-03-24 03:34:11.000000000 +1100 |
61 |
-+++ happstack-server-7.4.2/src/Happstack/Server/RqData.hs 2015-04-04 15:25:15.454830906 +1100 |
62 |
-@@ -92,7 +92,7 @@ |
63 |
- newtype ReaderError r e a = ReaderError { unReaderError :: ReaderT r (Either e) a } |
64 |
- deriving (Functor, Monad, MonadPlus) |
65 |
- |
66 |
--instance (Error e) => MonadReader r (ReaderError r e) where |
67 |
-+instance (Error e, Monoid e) => MonadReader r (ReaderError r e) where |
68 |
- ask = ReaderError ask |
69 |
- local f m = ReaderError $ local f (unReaderError m) |
70 |
- |
71 |
-@@ -157,7 +157,7 @@ |
72 |
- rqDataError e = mapRqData ((Left e) `apEither`) (return ()) |
73 |
- |
74 |
- -- instance (MonadPlus m, MonadIO m, ServerMonad m) => (HasRqData m) where |
75 |
--instance (MonadIO m) => HasRqData (ServerPartT m) where |
76 |
-+instance (MonadIO m, MonadPlus m) => HasRqData (ServerPartT m) where |
77 |
- askRqEnv = |
78 |
- do rq <- askRq |
79 |
- mbi <- liftIO $ if ((rqMethod rq == POST) || (rqMethod rq == PUT)) && (isDecodable (ctype rq)) |
80 |
|
81 |
diff --git a/dev-haskell/happstack-server/files/happstack-server-7.4.2-time-1.5.patch b/dev-haskell/happstack-server/files/happstack-server-7.4.2-time-1.5.patch |
82 |
deleted file mode 100644 |
83 |
index d116cb6..0000000 |
84 |
--- a/dev-haskell/happstack-server/files/happstack-server-7.4.2-time-1.5.patch |
85 |
+++ /dev/null |
86 |
@@ -1,225 +0,0 @@ |
87 |
-commit 65b7c1c907cc7a60b088ff8de43edd1e1f1d5165 |
88 |
-Author: Tenor Biel <tenorbiel@×××××.com> |
89 |
-Date: Mon Mar 30 02:46:58 2015 -0500 |
90 |
- |
91 |
- add version handlers for time-1.5.* and time-1.4.* |
92 |
- |
93 |
-diff --git a/src/Happstack/Server/FileServe/BuildingBlocks.hs b/src/Happstack/Server/FileServe/BuildingBlocks.hs |
94 |
-index eda3727..9650305 100644 |
95 |
---- a/src/Happstack/Server/FileServe/BuildingBlocks.hs |
96 |
-+++ b/src/Happstack/Server/FileServe/BuildingBlocks.hs |
97 |
-@@ -65,7 +65,6 @@ import Data.List (sort) |
98 |
- import Data.Maybe (fromMaybe) |
99 |
- import Data.Map (Map) |
100 |
- import qualified Data.Map as Map |
101 |
--import Data.Time (UTCTime, formatTime) |
102 |
- import Data.Time.Compat (toUTCTime) |
103 |
- import Filesystem.Path.CurrentOS (commonPrefix, encodeString, decodeString, collapse, append) |
104 |
- import Happstack.Server.Monads (ServerMonad(askRq), FilterMonad, WebMonad) |
105 |
-@@ -74,12 +73,18 @@ import Happstack.Server.Types (Length(ContentLength), Request(rqPaths, rqU |
106 |
- import System.Directory (doesDirectoryExist, doesFileExist, getDirectoryContents, getModificationTime) |
107 |
- import System.FilePath ((</>), addTrailingPathSeparator, hasDrive, isPathSeparator, joinPath, takeExtension, isValid) |
108 |
- import System.IO (IOMode(ReadMode), hFileSize, hClose, openBinaryFile, withBinaryFile) |
109 |
--import System.Locale (defaultTimeLocale) |
110 |
- import System.Log.Logger (Priority(DEBUG), logM) |
111 |
- import Text.Blaze.Html ((!)) |
112 |
- import qualified Text.Blaze.Html5 as H |
113 |
- import qualified Text.Blaze.Html5.Attributes as A |
114 |
- |
115 |
-+#if MIN_VERSION_time(1,5,0) |
116 |
-+import Data.Time (UTCTime, formatTime, defaultTimeLocale) |
117 |
-+#else |
118 |
-+import System.Locale (defaultTimeLocale) |
119 |
-+import Data.Time (UTCTime, formatTime) |
120 |
-+#endif |
121 |
-+ |
122 |
- -- * Mime-Type / Content-Type |
123 |
- |
124 |
- -- |a 'Map' from file extensions to content-types |
125 |
-diff --git a/src/Happstack/Server/Internal/Clock.hs b/src/Happstack/Server/Internal/Clock.hs |
126 |
-index 6a16b9b..7d58877 100644 |
127 |
---- a/src/Happstack/Server/Internal/Clock.hs |
128 |
-+++ b/src/Happstack/Server/Internal/Clock.hs |
129 |
-@@ -12,9 +12,14 @@ import Control.Monad |
130 |
- import Data.IORef |
131 |
- import Data.Time.Clock (UTCTime) |
132 |
- import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime, posixSecondsToUTCTime) |
133 |
--import Data.Time.Format (formatTime) |
134 |
- import System.IO.Unsafe |
135 |
--import System.Locale |
136 |
-+ |
137 |
-+#if MIN_VERSION_time(1,5,0) |
138 |
-+import Data.Time.Format (formatTime, defaultTimeLocale) |
139 |
-+#else |
140 |
-+import Data.Time.Format (formatTime) |
141 |
-+import System.Locale (defaultTimeLocale) |
142 |
-+#endif |
143 |
- |
144 |
- import qualified Data.ByteString.Char8 as B |
145 |
- |
146 |
-@@ -57,4 +62,4 @@ getApproximatePOSIXTime :: IO POSIXTime |
147 |
- getApproximatePOSIXTime = readIORef (cachedPOSIXTime clock) |
148 |
- |
149 |
- getApproximateUTCTime :: IO UTCTime |
150 |
--getApproximateUTCTime = posixSecondsToUTCTime <$> getApproximatePOSIXTime |
151 |
-\ No newline at end of file |
152 |
-+getApproximateUTCTime = posixSecondsToUTCTime <$> getApproximatePOSIXTime |
153 |
-diff --git a/src/Happstack/Server/Internal/Cookie.hs b/src/Happstack/Server/Internal/Cookie.hs |
154 |
-index b65edbd..ea76345 100644 |
155 |
---- a/src/Happstack/Server/Internal/Cookie.hs |
156 |
-+++ b/src/Happstack/Server/Internal/Cookie.hs |
157 |
-@@ -23,10 +23,15 @@ import Data.Data (Data, Typeable) |
158 |
- import Data.List ((\\), intersperse) |
159 |
- import Data.Time.Clock (UTCTime, addUTCTime, diffUTCTime) |
160 |
- import Data.Time.Clock.POSIX (posixSecondsToUTCTime) |
161 |
--import Data.Time.Format (formatTime) |
162 |
- import Happstack.Server.Internal.Clock (getApproximateUTCTime) |
163 |
- import Text.ParserCombinators.Parsec hiding (token) |
164 |
--import System.Locale (defaultTimeLocale) |
165 |
-+ |
166 |
-+#if MIN_VERSION_time(1,5,0) |
167 |
-+import Data.Time.Format (formatTime, defaultTimeLocale) |
168 |
-+#else |
169 |
-+import Data.Time.Format (formatTime) |
170 |
-+import System.Locale (defaultTimeLocale) |
171 |
-+#endif |
172 |
- |
173 |
- -- | a type for HTTP cookies. Usually created using 'mkCookie'. |
174 |
- data Cookie = Cookie |
175 |
-diff --git a/src/Happstack/Server/Internal/LogFormat.hs b/src/Happstack/Server/Internal/LogFormat.hs |
176 |
-index 5561940..c85ff81 100644 |
177 |
---- a/src/Happstack/Server/Internal/LogFormat.hs |
178 |
-+++ b/src/Happstack/Server/Internal/LogFormat.hs |
179 |
-@@ -3,8 +3,12 @@ module Happstack.Server.Internal.LogFormat |
180 |
- , formatRequestCombined |
181 |
- ) where |
182 |
- |
183 |
--import System.Locale (defaultTimeLocale) |
184 |
-+#if MIN_VERSION_time(1,5,0) |
185 |
-+import Data.Time.Format (FormatTime(..), formatTime, defaultTimeLocale) |
186 |
-+#else |
187 |
- import Data.Time.Format (FormatTime(..), formatTime) |
188 |
-+import System.Locale (defaultTimeLocale) |
189 |
-+#endif |
190 |
- |
191 |
- -- | Format the time as describe in the Apache combined log format. |
192 |
- -- https://httpd.apache.org/docs/2.2/logs.html#combined |
193 |
-diff --git a/src/Happstack/Server/Response.hs b/src/Happstack/Server/Response.hs |
194 |
-index 7ae52b3..23f61b0 100644 |
195 |
---- a/src/Happstack/Server/Response.hs |
196 |
-+++ b/src/Happstack/Server/Response.hs |
197 |
-@@ -1,6 +1,6 @@ |
198 |
- {-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeSynonymInstances, ScopedTypeVariables #-} |
199 |
- -- | Functions and classes related to generating a 'Response' and setting the response code. For detailed instruction see the Happstack Crash Course: <http://happstack.com/docs/crashcourse/HelloWorld.html#response_code> |
200 |
--module Happstack.Server.Response |
201 |
-+module Happstack.Server.Response |
202 |
- ( -- * Converting values to a 'Response' |
203 |
- ToMessage(..) |
204 |
- , flatten |
205 |
-@@ -34,24 +34,29 @@ import qualified Data.Text as T |
206 |
- import qualified Data.Text.Encoding as T |
207 |
- import qualified Data.Text.Lazy as LT |
208 |
- import qualified Data.Text.Lazy.Encoding as LT |
209 |
--import Data.Time (UTCTime, formatTime) |
210 |
- import Happstack.Server.Internal.Monads (FilterMonad(composeFilter)) |
211 |
- import Happstack.Server.Types (Response(..), Request(..), nullRsFlags, getHeader, noContentLength, redirect, result, setHeader, setHeaderBS) |
212 |
- import Happstack.Server.SURI (ToSURI) |
213 |
--import System.Locale (defaultTimeLocale) |
214 |
- import qualified Text.Blaze.Html as Blaze |
215 |
- import qualified Text.Blaze.Html.Renderer.Utf8 as Blaze |
216 |
- import Text.Html (Html, renderHtml) |
217 |
- import qualified Text.XHtml as XHtml (Html, renderHtml) |
218 |
- |
219 |
-+#if MIN_VERSION_time(1,5,0) |
220 |
-+import Data.Time (UTCTime, formatTime, defaultTimeLocale) |
221 |
-+#else |
222 |
-+import Data.Time (UTCTime, formatTime) |
223 |
-+import System.Locale (defaultTimeLocale) |
224 |
-+#endif |
225 |
-+ |
226 |
- -- | A low-level function to build a 'Response' from a content-type |
227 |
- -- and a 'ByteString'. |
228 |
- -- |
229 |
- -- Creates a 'Response' in a manner similar to the 'ToMessage' class, |
230 |
- -- but without requiring an instance declaration. |
231 |
---- |
232 |
-+-- |
233 |
- -- example: |
234 |
---- |
235 |
-+-- |
236 |
- -- > import Data.ByteString.Char8 as C |
237 |
- -- > import Data.ByteString.Lazy.Char8 as L |
238 |
- -- > import Happstack.Server |
239 |
-@@ -85,7 +90,7 @@ toResponseBS contentType message = |
240 |
- -- |
241 |
- -- > main = serve Nothing $ toResponse "hello, world!" |
242 |
- -- |
243 |
---- Minimal definition: 'toMessage' (and usually 'toContentType'). |
244 |
-+-- Minimal definition: 'toMessage' (and usually 'toContentType'). |
245 |
- class ToMessage a where |
246 |
- toContentType :: a -> B.ByteString |
247 |
- toContentType _ = B.pack "text/plain" |
248 |
-@@ -194,31 +199,31 @@ modifyResponse = composeFilter |
249 |
- -- |
250 |
- -- A filter for setting the response code. Generally you will use a |
251 |
- -- helper function like 'ok' or 'seeOther'. |
252 |
---- |
253 |
-+-- |
254 |
- -- > main = simpleHTTP nullConf $ do setResponseCode 200 |
255 |
- -- > return "Everything is OK" |
256 |
---- |
257 |
-+-- |
258 |
- -- see also: 'resp' |
259 |
--setResponseCode :: FilterMonad Response m => |
260 |
-+setResponseCode :: FilterMonad Response m => |
261 |
- Int -- ^ response code |
262 |
- -> m () |
263 |
- setResponseCode code |
264 |
- = composeFilter $ \r -> r{rsCode = code} |
265 |
- |
266 |
- -- | Same as @'setResponseCode' status >> return val@. |
267 |
---- |
268 |
-+-- |
269 |
- -- Use this if you want to set a response code that does not already |
270 |
---- have a helper function. |
271 |
---- |
272 |
-+-- have a helper function. |
273 |
-+-- |
274 |
- -- > main = simpleHTTP nullConf $ resp 200 "Everything is OK" |
275 |
--resp :: (FilterMonad Response m) => |
276 |
-+resp :: (FilterMonad Response m) => |
277 |
- Int -- ^ response code |
278 |
- -> b -- ^ value to return |
279 |
- -> m b |
280 |
- resp status val = setResponseCode status >> return val |
281 |
- |
282 |
- -- | Respond with @200 OK@. |
283 |
---- |
284 |
-+-- |
285 |
- -- > main = simpleHTTP nullConf $ ok "Everything is OK" |
286 |
- ok :: (FilterMonad Response m) => a -> m a |
287 |
- ok = resp 200 |
288 |
-@@ -239,7 +244,7 @@ movedPermanently uri res = do modifyResponse $ redirect 301 uri |
289 |
- return res |
290 |
- |
291 |
- -- | Respond with @302 Found@. |
292 |
---- |
293 |
-+-- |
294 |
- -- You probably want 'seeOther'. This method is not in popular use anymore, and is generally treated like 303 by most user-agents anyway. |
295 |
- found :: (FilterMonad Response m, ToSURI uri) => uri -> res -> m res |
296 |
- found uri res = do modifyResponse $ redirect 302 uri |
297 |
-@@ -284,7 +289,7 @@ forbidden :: (FilterMonad Response m) => a -> m a |
298 |
- forbidden = resp 403 |
299 |
- |
300 |
- -- | Respond with @404 Not Found@. |
301 |
---- |
302 |
-+-- |
303 |
- -- > main = simpleHTTP nullConf $ notFound "What you are looking for has not been found." |
304 |
- notFound :: (FilterMonad Response m) => a -> m a |
305 |
- notFound = resp 404 |
306 |
-@@ -324,4 +329,4 @@ prettyResponse res@SendFile{} = |
307 |
- showString "\nrsValidator = " . shows (rsValidator res). |
308 |
- showString "\nsfFilePath = " . shows (sfFilePath res) . |
309 |
- showString "\nsfOffset = " . shows (sfOffset res) . |
310 |
-- showString "\nsfCount = " $ show (sfCount res) |
311 |
-+ showString "\nsfCount = " $ show (sfCount res) |