update patches for newer package versions
This commit is contained in:
parent
4ada52698a
commit
20be770a77
18 changed files with 1935 additions and 645 deletions
|
@ -1,6 +1,6 @@
|
|||
From 087f1ae5e17f0e6d7c9f6b4092a5bb5bb6f5bf60 Mon Sep 17 00:00:00 2001
|
||||
From e5072d9b721cc25fa1017df97d71bf926a78d4e5 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:59:11 +0000
|
||||
Date: Fri, 3 Jul 2015 02:24:19 +0000
|
||||
Subject: [PATCH] port
|
||||
|
||||
---
|
||||
|
@ -9,48 +9,48 @@ Subject: [PATCH] port
|
|||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
|
||||
index 5721e03..c4400d1 100644
|
||||
index 31f6373..6487c7b 100644
|
||||
--- a/Network/DNS/Resolver.hs
|
||||
+++ b/Network/DNS/Resolver.hs
|
||||
@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
|
||||
@@ -18,7 +18,7 @@ module Network.DNS.Resolver (
|
||||
, fromDNSFormat
|
||||
) where
|
||||
|
||||
import Control.Applicative ((<$>), (<*>), pure)
|
||||
-import Control.Exception (bracket)
|
||||
+import Control.Exception (bracket, catch, IOException)
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import Data.Char (isSpace)
|
||||
import Data.List (isPrefixOf)
|
||||
@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), defaultHints, getAddrInfo
|
||||
import Data.Maybe (fromMaybe)
|
||||
@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), SockAddr(..), PortNumber(
|
||||
import Prelude hiding (lookup)
|
||||
import System.Random (getStdRandom, randomR)
|
||||
import System.Timeout (timeout)
|
||||
+import System.Process
|
||||
|
||||
#if mingw32_HOST_OS == 1
|
||||
import Network.Socket (send)
|
||||
@@ -130,10 +131,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
|
||||
where
|
||||
#if __GLASGOW_HASKELL__ < 709
|
||||
import Control.Applicative ((<$>), (<*>), pure)
|
||||
@@ -136,10 +137,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
|
||||
addr = case resolvInfo conf of
|
||||
RCHostName numhost -> makeAddrInfo numhost
|
||||
- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
|
||||
RCHostName numhost -> makeAddrInfo numhost Nothing
|
||||
RCHostPort numhost mport -> makeAddrInfo numhost $ Just mport
|
||||
- RCFilePath file -> toAddr <$> readFile file >>= \i -> makeAddrInfo i Nothing
|
||||
- toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
|
||||
- in extract l
|
||||
- extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
|
||||
+ RCFilePath file -> do
|
||||
+ -- Android has no /etc/resolv.conf; use getprop command.
|
||||
+ ls <- catch (lines <$> readProcess "getprop" ["net.dns1"] []) (const (return []) :: IOException -> IO [String])
|
||||
+ makeAddrInfo $ case ls of
|
||||
+ flip makeAddrInfo Nothing $ case ls of
|
||||
+ [] -> "8.8.8.8" -- google public dns as a fallback only
|
||||
+ (l:_) -> l
|
||||
|
||||
makeAddrInfo :: HostName -> IO AddrInfo
|
||||
makeAddrInfo addr = do
|
||||
makeAddrInfo :: HostName -> Maybe PortNumber -> IO AddrInfo
|
||||
makeAddrInfo addr mport = do
|
||||
diff --git a/dns.cabal b/dns.cabal
|
||||
index ceaf5f4..cd15e61 100644
|
||||
index 0745754..8cf4b67 100644
|
||||
--- a/dns.cabal
|
||||
+++ b/dns.cabal
|
||||
@@ -37,6 +37,7 @@ Library
|
||||
@@ -39,6 +39,7 @@ Library
|
||||
, network >= 2.3
|
||||
, random
|
||||
, resourcet
|
||||
|
@ -59,5 +59,5 @@ index ceaf5f4..cd15e61 100644
|
|||
Build-Depends: base >= 4 && < 5
|
||||
, attoparsec
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
27
standalone/android/haskell-patches/entropy_cross-build.patch
Normal file
27
standalone/android/haskell-patches/entropy_cross-build.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
From 8e942c1f661b30e5477607b78528634e6d345ae8 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Thu, 2 Jul 2015 21:16:15 +0000
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
entropy.cabal | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/entropy.cabal b/entropy.cabal
|
||||
index e4fb436..e26896c 100644
|
||||
--- a/entropy.cabal
|
||||
+++ b/entropy.cabal
|
||||
@@ -14,10 +14,7 @@ category: Data, Cryptography
|
||||
homepage: https://github.com/TomMD/entropy
|
||||
bug-reports: https://github.com/TomMD/entropy/issues
|
||||
stability: stable
|
||||
--- build-type: Simple
|
||||
--- ^^ Used for HaLVM
|
||||
-build-type: Custom
|
||||
--- ^^ Test for RDRAND support using 'ghc'
|
||||
+build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
tested-with: GHC == 7.8.2
|
||||
-- data-files:
|
||||
--
|
||||
2.1.4
|
|
@ -1,31 +1,31 @@
|
|||
From 7beec2e707d59f9573aa2dc7c57bd2a62f16b480 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 15 May 2013 19:06:03 -0400
|
||||
From b2b88224426fe6c7c72ebdec2946fd1ddbacbfaf Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 2 Jul 2015 20:42:50 +0000
|
||||
Subject: [PATCH] build without IPv6 stuff
|
||||
|
||||
---
|
||||
Data/IP.hs | 2 +-
|
||||
Data/IP/Addr.hs | 3 +++
|
||||
Data/IP.hs | 2 +-
|
||||
Data/IP/Addr.hs | 3 +++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Data/IP.hs b/Data/IP.hs
|
||||
index cffef93..ea486c9 100644
|
||||
index 306a488..e3f252e 100644
|
||||
--- a/Data/IP.hs
|
||||
+++ b/Data/IP.hs
|
||||
@@ -6,7 +6,7 @@ module Data.IP (
|
||||
-- ** IP data
|
||||
IP (..)
|
||||
, IPv4, toIPv4, fromIPv4, fromHostAddress, toHostAddress
|
||||
- , IPv6, toIPv6, fromIPv6, fromHostAddress6, toHostAddress6
|
||||
+ , IPv6, toIPv6, fromIPv6 -- , fromHostAddress6, toHostAddress6
|
||||
- , IPv6, toIPv6, toIPv6b, fromIPv6, fromIPv6b, fromHostAddress6, toHostAddress6
|
||||
+ , IPv6, toIPv6, toIPv6b, fromIPv6, fromIPv6b -- , fromHostAddress6, toHostAddress6
|
||||
-- ** IP range data
|
||||
, IPRange (..)
|
||||
, AddrRange (addr, mask, mlen)
|
||||
diff --git a/Data/IP/Addr.hs b/Data/IP/Addr.hs
|
||||
index faaf0c7..5b556fb 100644
|
||||
index 8d4131e..868a572 100644
|
||||
--- a/Data/IP/Addr.hs
|
||||
+++ b/Data/IP/Addr.hs
|
||||
@@ -312,6 +312,7 @@ toHostAddress (IP4 addr4)
|
||||
@@ -376,6 +376,7 @@ toHostAddress (IP4 addr4)
|
||||
| byteOrder == LittleEndian = fixByteOrder addr4
|
||||
| otherwise = addr4
|
||||
|
||||
|
@ -33,7 +33,7 @@ index faaf0c7..5b556fb 100644
|
|||
-- | The 'fromHostAddress6' function converts 'HostAddress6' to 'IPv6'.
|
||||
fromHostAddress6 :: HostAddress6 -> IPv6
|
||||
fromHostAddress6 = IP6
|
||||
@@ -320,6 +321,8 @@ fromHostAddress6 = IP6
|
||||
@@ -384,6 +385,8 @@ fromHostAddress6 = IP6
|
||||
toHostAddress6 :: IPv6 -> HostAddress6
|
||||
toHostAddress6 (IP6 addr6) = addr6
|
||||
|
||||
|
@ -43,5 +43,5 @@ index faaf0c7..5b556fb 100644
|
|||
fixByteOrder s = d1 .|. d2 .|. d3 .|. d4
|
||||
where
|
||||
--
|
||||
1.7.10.4
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
From 7861b133bb269b50fcf709291449cb0473818902 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Sun, 29 Dec 2013 21:29:23 +0000
|
||||
From 508b4701c1610d9772564b97a74b5fa01dab48e2 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 2 Jul 2015 20:12:59 +0000
|
||||
Subject: [PATCH] remove Network.BSD symbols not available in bionic
|
||||
|
||||
---
|
||||
Network/BSD.hsc | 98 -------------------------------------------------------
|
||||
1 file changed, 98 deletions(-)
|
||||
Network/BSD.hsc | 100 --------------------------------------------------------
|
||||
1 file changed, 100 deletions(-)
|
||||
|
||||
diff --git a/Network/BSD.hsc b/Network/BSD.hsc
|
||||
index d6dae85..27910f4 100644
|
||||
index b5e9a26..f085f2a 100644
|
||||
--- a/Network/BSD.hsc
|
||||
+++ b/Network/BSD.hsc
|
||||
@@ -30,15 +30,6 @@ module Network.BSD
|
||||
@@ -27,15 +27,6 @@ module Network.BSD
|
||||
, getHostByAddr
|
||||
, hostAddress
|
||||
|
||||
|
@ -27,7 +27,7 @@ index d6dae85..27910f4 100644
|
|||
-- * Service names
|
||||
, ServiceEntry(..)
|
||||
, ServiceName
|
||||
@@ -64,14 +55,6 @@ module Network.BSD
|
||||
@@ -61,14 +52,6 @@ module Network.BSD
|
||||
, getProtocolNumber
|
||||
, defaultProtocol
|
||||
|
||||
|
@ -42,7 +42,7 @@ index d6dae85..27910f4 100644
|
|||
-- * Port numbers
|
||||
, PortNumber
|
||||
|
||||
@@ -83,11 +66,7 @@ module Network.BSD
|
||||
@@ -80,11 +63,7 @@ module Network.BSD
|
||||
#if !defined(cygwin32_HOST_OS) && !defined(mingw32_HOST_OS) && !defined(_WIN32)
|
||||
, getNetworkByName
|
||||
, getNetworkByAddr
|
||||
|
@ -52,9 +52,9 @@ index d6dae85..27910f4 100644
|
|||
- , getNetworkEntry
|
||||
- , endNetworkEntry
|
||||
#endif
|
||||
) where
|
||||
|
||||
@@ -303,31 +282,6 @@ getProtocolNumber proto = do
|
||||
#if defined(HAVE_IF_NAMETOINDEX)
|
||||
@@ -298,31 +277,6 @@ getProtocolNumber proto = do
|
||||
(ProtocolEntry _ _ num) <- getProtocolByName proto
|
||||
return num
|
||||
|
||||
|
@ -62,18 +62,18 @@ index d6dae85..27910f4 100644
|
|||
-getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
|
||||
-getProtocolEntry = withLock $ do
|
||||
- ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
|
||||
- $ trySysCall c_getprotoent
|
||||
- $ c_getprotoent
|
||||
- peek ent
|
||||
-
|
||||
-foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)
|
||||
-
|
||||
-setProtocolEntry :: Bool -> IO () -- Keep DB Open ?
|
||||
-setProtocolEntry flg = withLock $ trySysCall $ c_setprotoent (fromBool flg)
|
||||
-setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO ()
|
||||
-
|
||||
-endProtocolEntry :: IO ()
|
||||
-endProtocolEntry = withLock $ trySysCall $ c_endprotoent
|
||||
-endProtocolEntry = withLock $ c_endprotoent
|
||||
-
|
||||
-foreign import ccall unsafe "endprotoent" c_endprotoent :: IO ()
|
||||
-
|
||||
|
@ -86,7 +86,7 @@ index d6dae85..27910f4 100644
|
|||
-- ---------------------------------------------------------------------------
|
||||
-- Host lookups
|
||||
|
||||
@@ -402,31 +356,6 @@ getHostByAddr family addr = do
|
||||
@@ -397,31 +351,6 @@ getHostByAddr family addr = do
|
||||
foreign import CALLCONV safe "gethostbyaddr"
|
||||
c_gethostbyaddr :: Ptr HostAddress -> CInt -> CInt -> IO (Ptr HostEntry)
|
||||
|
||||
|
@ -94,13 +94,13 @@ index d6dae85..27910f4 100644
|
|||
-getHostEntry :: IO HostEntry
|
||||
-getHostEntry = withLock $ do
|
||||
- throwNoSuchThingIfNull "getHostEntry" "unable to retrieve host entry"
|
||||
- $ trySysCall $ c_gethostent
|
||||
- $ c_gethostent
|
||||
- >>= peek
|
||||
-
|
||||
-foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry)
|
||||
-
|
||||
-setHostEntry :: Bool -> IO ()
|
||||
-setHostEntry flg = withLock $ trySysCall $ c_sethostent (fromBool flg)
|
||||
-setHostEntry flg = withLock $ c_sethostent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO ()
|
||||
-
|
||||
|
@ -118,14 +118,14 @@ index d6dae85..27910f4 100644
|
|||
-- ---------------------------------------------------------------------------
|
||||
-- Accessing network information
|
||||
|
||||
@@ -488,33 +417,6 @@ getNetworkByAddr addr family = withLock $ do
|
||||
@@ -483,35 +412,6 @@ getNetworkByAddr addr family = withLock $ do
|
||||
foreign import ccall unsafe "getnetbyaddr"
|
||||
c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry)
|
||||
|
||||
-getNetworkEntry :: IO NetworkEntry
|
||||
-getNetworkEntry = withLock $ do
|
||||
- throwNoSuchThingIfNull "getNetworkEntry" "no more network entries"
|
||||
- $ trySysCall $ c_getnetent
|
||||
- $ c_getnetent
|
||||
- >>= peek
|
||||
-
|
||||
-foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry)
|
||||
|
@ -134,13 +134,13 @@ index d6dae85..27910f4 100644
|
|||
--- whether a connection is maintained open between various
|
||||
--- networkEntry calls
|
||||
-setNetworkEntry :: Bool -> IO ()
|
||||
-setNetworkEntry flg = withLock $ trySysCall $ c_setnetent (fromBool flg)
|
||||
-setNetworkEntry flg = withLock $ c_setnetent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO ()
|
||||
-
|
||||
--- | Close the connection to the network name database.
|
||||
-endNetworkEntry :: IO ()
|
||||
-endNetworkEntry = withLock $ trySysCall $ c_endnetent
|
||||
-endNetworkEntry = withLock $ c_endnetent
|
||||
-
|
||||
-foreign import ccall unsafe "endnetent" c_endnetent :: IO ()
|
||||
-
|
||||
|
@ -149,9 +149,11 @@ index d6dae85..27910f4 100644
|
|||
-getNetworkEntries stayOpen = do
|
||||
- setNetworkEntry stayOpen
|
||||
- getEntries (getNetworkEntry) (endNetworkEntry)
|
||||
#endif
|
||||
-#endif
|
||||
-
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- Interface names
|
||||
|
||||
-- Mutex for name service lockdown
|
||||
--
|
||||
1.7.10.4
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 478fc7ae42030c1345e75727e54e1f8f895d3e22 Mon Sep 17 00:00:00 2001
|
||||
From 21af25e922b00171c07f951a235ff7d7edbbd2be Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 15 Oct 2014 15:16:21 +0000
|
||||
Date: Thu, 2 Jul 2015 20:14:40 +0000
|
||||
Subject: [PATCH] avoid accept4
|
||||
|
||||
---
|
||||
|
@ -8,19 +8,19 @@ Subject: [PATCH] avoid accept4
|
|||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
|
||||
index 2fe62ee..94db7a4 100644
|
||||
index 6553bfc..802a7e9 100644
|
||||
--- a/Network/Socket.hsc
|
||||
+++ b/Network/Socket.hsc
|
||||
@@ -511,7 +511,7 @@ accept sock@(MkSocket s family stype protocol status) = do
|
||||
@@ -489,7 +489,7 @@ accept sock@(MkSocket s family stype protocol status) = do
|
||||
return new_sock
|
||||
#else
|
||||
with (fromIntegral sz) $ \ ptr_len -> do
|
||||
new_sock <-
|
||||
-# ifdef HAVE_ACCEPT4
|
||||
+#if 0
|
||||
throwSocketErrorIfMinus1RetryMayBlock "accept"
|
||||
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
|
||||
(threadWaitRead (fromIntegral s))
|
||||
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
|
||||
@@ -1602,7 +1602,7 @@ foreign import CALLCONV SAFE_ON_WIN "connect"
|
||||
@@ -1565,7 +1565,7 @@ foreign import CALLCONV SAFE_ON_WIN "connect"
|
||||
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
||||
foreign import CALLCONV unsafe "accept"
|
||||
c_accept :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> IO CInt
|
||||
|
@ -30,5 +30,5 @@ index 2fe62ee..94db7a4 100644
|
|||
c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
|
||||
#endif
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
From cf110acc7f5863bb80ba835a009a7f59d3453239 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 2 Jul 2015 20:19:14 +0000
|
||||
Subject: [PATCH] fix build
|
||||
|
||||
---
|
||||
Network/BSD.hsc | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/Network/BSD.hsc b/Network/BSD.hsc
|
||||
index e11ac71..039d0f1 100644
|
||||
--- a/Network/BSD.hsc
|
||||
+++ b/Network/BSD.hsc
|
||||
@@ -396,7 +396,6 @@ instance Storable NetworkEntry where
|
||||
poke _p = error "Storable.poke(BSD.NetEntry) not implemented"
|
||||
|
||||
|
||||
-#if !defined(cygwin32_HOST_OS) && !defined(mingw32_HOST_OS) && !defined(_WIN32)
|
||||
getNetworkByName :: NetworkName -> IO NetworkEntry
|
||||
getNetworkByName name = withLock $ do
|
||||
withCString name $ \ name_cstr -> do
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
From db9eb179885874af342bb2c3adef7185496ba1f1 Mon Sep 17 00:00:00 2001
|
||||
From da127aa3b2c6cbf679950eb593eb8c88384cc26b Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 15 Oct 2014 16:37:32 +0000
|
||||
Date: Thu, 2 Jul 2015 20:34:05 +0000
|
||||
Subject: [PATCH] hack for bionic
|
||||
|
||||
---
|
||||
|
@ -9,10 +9,10 @@ Subject: [PATCH] hack for bionic
|
|||
2 files changed, 1 insertion(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
|
||||
index d30f39b..ec7ca4c 100644
|
||||
index 6253b27..fb5b3fa 100644
|
||||
--- a/Data/UnixTime/Types.hsc
|
||||
+++ b/Data/UnixTime/Types.hsc
|
||||
@@ -9,8 +9,6 @@ import Foreign.Storable
|
||||
@@ -12,8 +12,6 @@ import Data.Binary
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
|
@ -20,8 +20,8 @@ index d30f39b..ec7ca4c 100644
|
|||
-
|
||||
-- |
|
||||
-- Data structure for Unix time.
|
||||
data UnixTime = UnixTime {
|
||||
@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
|
||||
--
|
||||
@@ -33,16 +31,6 @@ data UnixTime = UnixTime {
|
||||
, utMicroSeconds :: {-# UNPACK #-} !Int32
|
||||
} deriving (Eq,Ord,Show)
|
||||
|
||||
|
@ -35,14 +35,14 @@ index d30f39b..ec7ca4c 100644
|
|||
- (#poke struct timeval, tv_sec) ptr (utSeconds ut)
|
||||
- (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut)
|
||||
-
|
||||
-- |
|
||||
-- Format of the strptime()/strftime() style.
|
||||
type Format = ByteString
|
||||
#if __GLASGOW_HASKELL__ >= 704
|
||||
instance Binary UnixTime where
|
||||
put (UnixTime (CTime sec) msec) = do
|
||||
diff --git a/cbits/conv.c b/cbits/conv.c
|
||||
index ec31fef..b7bc0f9 100644
|
||||
index 669cfda..8fa5f9a 100644
|
||||
--- a/cbits/conv.c
|
||||
+++ b/cbits/conv.c
|
||||
@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
|
||||
@@ -98,7 +98,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
|
||||
#else
|
||||
strptime(src, fmt, &dst);
|
||||
#endif
|
||||
|
@ -52,5 +52,5 @@ index ec31fef..b7bc0f9 100644
|
|||
|
||||
size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
From 87283f9b6f992a7f0e36c7b1bafc288bf2bf106a Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Mon, 11 Nov 2013 02:46:27 +0000
|
||||
Subject: [PATCH] build without v1 uuid which needs network-ino
|
||||
From 04a1230cf4d740d37ab427165eef4b4db2a3898f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Fri, 3 Jul 2015 02:20:42 +0000
|
||||
Subject: [PATCH] build without v1 uuid which needs network-info
|
||||
|
||||
---
|
||||
Data/UUID/Util.hs | 11 -----------
|
||||
Data/UUID/V1.hs | 2 --
|
||||
uuid.cabal | 2 --
|
||||
3 files changed, 15 deletions(-)
|
||||
Data/UUID/Util.hs | 11 -----------
|
||||
uuid.cabal | 2 --
|
||||
2 files changed, 13 deletions(-)
|
||||
|
||||
diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
|
||||
index 581391a..399e508 100644
|
||||
index 8817f51..0d43b01 100644
|
||||
--- a/Data/UUID/Util.hs
|
||||
+++ b/Data/UUID/Util.hs
|
||||
@@ -3,7 +3,6 @@ module Data.UUID.Util (
|
||||
|
@ -24,49 +23,37 @@ index 581391a..399e508 100644
|
|||
@@ -13,7 +12,6 @@ import Data.Word
|
||||
import Data.Word.Util
|
||||
import Data.Bits
|
||||
import Data.UUID.Internal
|
||||
import Data.UUID.Types.Internal
|
||||
-import Network.Info
|
||||
import Data.Int (Int64)
|
||||
|
||||
version :: UUID -> Int
|
||||
@@ -43,12 +41,3 @@ extractTime uuid =
|
||||
@@ -42,12 +40,3 @@ extractTime uuid =
|
||||
|
||||
timeAndVersionToTime :: Word16 -> Word16
|
||||
timeAndVersionToTime tv = tv .&. 0x0FFF
|
||||
|
||||
-
|
||||
-extractMac :: UUID -> Maybe MAC
|
||||
-extractMac uuid =
|
||||
-extractMac uuid =
|
||||
- if version uuid == 1
|
||||
- then Just $
|
||||
- then Just $
|
||||
- MAC (node_0 unpacked) (node_1 unpacked) (node_2 unpacked) (node_3 unpacked) (node_4 unpacked) (node_5 unpacked)
|
||||
- else Nothing
|
||||
- where
|
||||
- unpacked = unpack uuid
|
||||
-
|
||||
diff --git a/Data/UUID/V1.hs b/Data/UUID/V1.hs
|
||||
index 067e729..ca4c235 100644
|
||||
--- a/Data/UUID/V1.hs
|
||||
+++ b/Data/UUID/V1.hs
|
||||
@@ -37,8 +37,6 @@ import System.IO.Unsafe
|
||||
|
||||
import qualified System.Random as R
|
||||
|
||||
-import Network.Info
|
||||
-
|
||||
import Data.UUID.Builder
|
||||
import Data.UUID.Internal
|
||||
|
||||
diff --git a/uuid.cabal b/uuid.cabal
|
||||
index 0a53059..57b1b86 100644
|
||||
index 2fa548b..9d86fd2 100644
|
||||
--- a/uuid.cabal
|
||||
+++ b/uuid.cabal
|
||||
@@ -32,14 +32,12 @@ Library
|
||||
@@ -30,7 +30,6 @@ Library
|
||||
binary >= 0.4 && < 0.8,
|
||||
bytestring >= 0.9 && < 0.11,
|
||||
cryptohash >= 0.7 && < 0.12,
|
||||
deepseq == 1.3.*,
|
||||
hashable (>= 1.1.1.0 && < 1.2.0) || (>= 1.2.1 && < 1.3),
|
||||
- network-info == 0.2.*,
|
||||
random >= 1.0.1 && < 1.1,
|
||||
time >= 1.1 && < 1.5
|
||||
|
||||
random >= 1.0.1 && < 1.2,
|
||||
time >= 1.1 && < 1.6,
|
||||
uuid-types >= 1.0 && < 2
|
||||
@@ -38,7 +37,6 @@ Library
|
||||
Exposed-Modules:
|
||||
Data.UUID
|
||||
Data.UUID.Util
|
||||
|
@ -75,5 +62,5 @@ index 0a53059..57b1b86 100644
|
|||
Data.UUID.V4
|
||||
Data.UUID.V5
|
||||
--
|
||||
1.7.10.4
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
From a33437e3150fb33d2fd22d29ff196be28a81c747 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Thu, 2 Jul 2015 21:48:18 +0000
|
||||
Subject: [PATCH] avoid ipv6 for android
|
||||
|
||||
---
|
||||
Network/Wai/Handler/Warp/Run.hs | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Network/Wai/Handler/Warp/Run.hs b/Network/Wai/Handler/Warp/Run.hs
|
||||
index 34ae455..ea7475c 100644
|
||||
--- a/Network/Wai/Handler/Warp/Run.hs
|
||||
+++ b/Network/Wai/Handler/Warp/Run.hs
|
||||
@@ -14,7 +14,7 @@ import Control.Monad (when, unless, void)
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString as S
|
||||
import Data.Char (chr)
|
||||
-import Data.IP (toHostAddress, toHostAddress6)
|
||||
+import Data.IP (toHostAddress)
|
||||
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
|
||||
import Data.Streaming.Network (bindPortTCP)
|
||||
import Network (sClose, Socket)
|
||||
@@ -323,13 +323,6 @@ serveConnection conn ii origAddr transport settings app = do
|
||||
[a] -> Just (SockAddrInet (readInt clientPort)
|
||||
(toHostAddress a))
|
||||
_ -> Nothing
|
||||
- ["PROXY","TCP6",clientAddr,_,clientPort,_] ->
|
||||
- case [x | (x, t) <- reads (decodeAscii clientAddr), null t] of
|
||||
- [a] -> Just (SockAddrInet6 (readInt clientPort)
|
||||
- 0
|
||||
- (toHostAddress6 a)
|
||||
- 0)
|
||||
- _ -> Nothing
|
||||
("PROXY":"UNKNOWN":_) ->
|
||||
Just origAddr
|
||||
_ ->
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
From e54cfacbb9fb24f75d3d93cd8ee6da67b161574f Mon Sep 17 00:00:00 2001
|
||||
From 6d4a7c63d737c9215ee55996715250c89f14c398 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:51:28 +0000
|
||||
Date: Fri, 3 Jul 2015 01:36:31 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ Subject: [PATCH] remove TH
|
|||
3 files changed, 306 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/DAV.cabal b/DAV.cabal
|
||||
index 95fffd8..5669c51 100644
|
||||
index f78c2e5..1ec4d80 100644
|
||||
--- a/DAV.cabal
|
||||
+++ b/DAV.cabal
|
||||
@@ -47,33 +47,7 @@ library
|
||||
|
@ -27,7 +27,7 @@ index 95fffd8..5669c51 100644
|
|||
- , containers
|
||||
- , data-default
|
||||
- , either >= 4.3
|
||||
- , errors
|
||||
- , errors < 2.0
|
||||
- , exceptions
|
||||
- , http-client >= 0.2
|
||||
- , http-client-tls >= 0.2
|
||||
|
@ -49,7 +49,7 @@ index 95fffd8..5669c51 100644
|
|||
source-repository head
|
||||
type: git
|
||||
diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs
|
||||
index 4c6d68f..55979b6 100644
|
||||
index 5d5d6fd..7265d42 100644
|
||||
--- a/Network/Protocol/HTTP/DAV.hs
|
||||
+++ b/Network/Protocol/HTTP/DAV.hs
|
||||
@@ -82,6 +82,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho
|
||||
|
@ -416,5 +416,5 @@ index 0ecd476..1653bf6 100644
|
|||
+ Data.Functor.<$> (_f_a3k7 __userAgent'_a3kg))
|
||||
+{-# INLINE userAgent #-}
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
From 10c9ade98b3ac2054947f411d77db2eb28896b9f Mon Sep 17 00:00:00 2001
|
||||
From 88ff2174944daf90530a33ee06e2e3f667089b6a Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 01:43:10 +0000
|
||||
Subject: [PATCH] avoid TH
|
||||
Date: Fri, 3 Jul 2015 02:06:43 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
lens.cabal | 17 +----------------
|
||||
src/Control/Lens.hs | 8 ++------
|
||||
lens.cabal | 16 +---------------
|
||||
src/Control/Lens.hs | 6 ++----
|
||||
src/Control/Lens/Cons.hs | 2 --
|
||||
src/Control/Lens/Internal/Fold.hs | 2 --
|
||||
src/Control/Lens/Operators.hs | 2 +-
|
||||
src/Control/Lens/Prism.hs | 2 --
|
||||
src/Control/Monad/Primitive/Lens.hs | 1 -
|
||||
7 files changed, 4 insertions(+), 30 deletions(-)
|
||||
7 files changed, 4 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/lens.cabal b/lens.cabal
|
||||
index 5388301..d7b02b9 100644
|
||||
index c7f6009..ab206c5 100644
|
||||
--- a/lens.cabal
|
||||
+++ b/lens.cabal
|
||||
@@ -10,7 +10,7 @@ stability: provisional
|
||||
|
@ -26,15 +26,7 @@ index 5388301..d7b02b9 100644
|
|||
-- build-tools: cpphs
|
||||
tested-with: GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.1, GHC == 7.8.2
|
||||
synopsis: Lenses, Folds and Traversals
|
||||
@@ -217,7 +217,6 @@ library
|
||||
Control.Exception.Lens
|
||||
Control.Lens
|
||||
Control.Lens.Action
|
||||
- Control.Lens.At
|
||||
Control.Lens.Combinators
|
||||
Control.Lens.Cons
|
||||
Control.Lens.Each
|
||||
@@ -234,8 +233,6 @@ library
|
||||
@@ -230,8 +230,6 @@ library
|
||||
Control.Lens.Internal.Context
|
||||
Control.Lens.Internal.Deque
|
||||
Control.Lens.Internal.Exception
|
||||
|
@ -43,7 +35,7 @@ index 5388301..d7b02b9 100644
|
|||
Control.Lens.Internal.Fold
|
||||
Control.Lens.Internal.Getter
|
||||
Control.Lens.Internal.Indexed
|
||||
@@ -247,25 +244,21 @@ library
|
||||
@@ -243,25 +241,21 @@ library
|
||||
Control.Lens.Internal.Reflection
|
||||
Control.Lens.Internal.Review
|
||||
Control.Lens.Internal.Setter
|
||||
|
@ -69,7 +61,7 @@ index 5388301..d7b02b9 100644
|
|||
Control.Monad.Primitive.Lens
|
||||
Control.Parallel.Strategies.Lens
|
||||
Control.Seq.Lens
|
||||
@@ -291,12 +284,8 @@ library
|
||||
@@ -287,12 +281,8 @@ library
|
||||
Data.Typeable.Lens
|
||||
Data.Vector.Lens
|
||||
Data.Vector.Generic.Lens
|
||||
|
@ -82,7 +74,7 @@ index 5388301..d7b02b9 100644
|
|||
Numeric.Lens
|
||||
|
||||
other-modules:
|
||||
@@ -403,7 +392,6 @@ test-suite doctests
|
||||
@@ -395,7 +385,6 @@ test-suite doctests
|
||||
deepseq,
|
||||
doctest >= 0.9.1,
|
||||
filepath,
|
||||
|
@ -90,7 +82,7 @@ index 5388301..d7b02b9 100644
|
|||
mtl,
|
||||
nats,
|
||||
parallel,
|
||||
@@ -441,7 +429,6 @@ benchmark plated
|
||||
@@ -433,7 +422,6 @@ benchmark plated
|
||||
comonad,
|
||||
criterion,
|
||||
deepseq,
|
||||
|
@ -98,7 +90,7 @@ index 5388301..d7b02b9 100644
|
|||
lens,
|
||||
transformers
|
||||
|
||||
@@ -476,7 +463,6 @@ benchmark unsafe
|
||||
@@ -468,7 +456,6 @@ benchmark unsafe
|
||||
comonads-fd,
|
||||
criterion,
|
||||
deepseq,
|
||||
|
@ -106,7 +98,7 @@ index 5388301..d7b02b9 100644
|
|||
lens,
|
||||
transformers
|
||||
|
||||
@@ -493,6 +479,5 @@ benchmark zipper
|
||||
@@ -485,6 +472,5 @@ benchmark zipper
|
||||
comonads-fd,
|
||||
criterion,
|
||||
deepseq,
|
||||
|
@ -114,18 +106,10 @@ index 5388301..d7b02b9 100644
|
|||
lens,
|
||||
transformers
|
||||
diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs
|
||||
index 7e15267..433f1fc 100644
|
||||
index d879c58..3d6015b 100644
|
||||
--- a/src/Control/Lens.hs
|
||||
+++ b/src/Control/Lens.hs
|
||||
@@ -41,7 +41,6 @@
|
||||
----------------------------------------------------------------------------
|
||||
module Control.Lens
|
||||
( module Control.Lens.Action
|
||||
- , module Control.Lens.At
|
||||
, module Control.Lens.Cons
|
||||
, module Control.Lens.Each
|
||||
, module Control.Lens.Empty
|
||||
@@ -53,12 +52,11 @@ module Control.Lens
|
||||
@@ -56,12 +56,11 @@ module Control.Lens
|
||||
, module Control.Lens.Lens
|
||||
, module Control.Lens.Level
|
||||
, module Control.Lens.Loupe
|
||||
|
@ -139,15 +123,7 @@ index 7e15267..433f1fc 100644
|
|||
, module Control.Lens.TH
|
||||
#endif
|
||||
, module Control.Lens.Traversal
|
||||
@@ -69,7 +67,6 @@ module Control.Lens
|
||||
) where
|
||||
|
||||
import Control.Lens.Action
|
||||
-import Control.Lens.At
|
||||
import Control.Lens.Cons
|
||||
import Control.Lens.Each
|
||||
import Control.Lens.Empty
|
||||
@@ -81,12 +78,11 @@ import Control.Lens.Iso
|
||||
@@ -83,12 +82,11 @@ import Control.Lens.Iso
|
||||
import Control.Lens.Lens
|
||||
import Control.Lens.Level
|
||||
import Control.Lens.Loupe
|
||||
|
@ -162,12 +138,12 @@ index 7e15267..433f1fc 100644
|
|||
#endif
|
||||
import Control.Lens.Traversal
|
||||
diff --git a/src/Control/Lens/Cons.hs b/src/Control/Lens/Cons.hs
|
||||
index a80e9c8..7d27b80 100644
|
||||
index 7b35db4..269f307 100644
|
||||
--- a/src/Control/Lens/Cons.hs
|
||||
+++ b/src/Control/Lens/Cons.hs
|
||||
@@ -55,8 +55,6 @@ import Data.Vector.Unboxed (Unbox)
|
||||
import qualified Data.Vector.Unboxed as Unbox
|
||||
@@ -56,8 +56,6 @@ import qualified Data.Vector.Unboxed as Unbox
|
||||
import Data.Word
|
||||
import Prelude
|
||||
|
||||
-{-# ANN module "HLint: ignore Eta reduce" #-}
|
||||
-
|
||||
|
@ -175,12 +151,12 @@ index a80e9c8..7d27b80 100644
|
|||
-- >>> :set -XNoOverloadedStrings
|
||||
-- >>> import Control.Lens
|
||||
diff --git a/src/Control/Lens/Internal/Fold.hs b/src/Control/Lens/Internal/Fold.hs
|
||||
index ab09c6b..43aa905 100644
|
||||
index 4bbde21..16295f4 100644
|
||||
--- a/src/Control/Lens/Internal/Fold.hs
|
||||
+++ b/src/Control/Lens/Internal/Fold.hs
|
||||
@@ -37,8 +37,6 @@ import Data.Maybe
|
||||
import Data.Semigroup hiding (Min, getMin, Max, getMax)
|
||||
@@ -35,8 +35,6 @@ import Data.Semigroup hiding (Min, getMin, Max, getMax)
|
||||
import Data.Reflection
|
||||
import Prelude
|
||||
|
||||
-{-# ANN module "HLint: ignore Avoid lambda" #-}
|
||||
-
|
||||
|
@ -188,10 +164,10 @@ index ab09c6b..43aa905 100644
|
|||
-- Folding
|
||||
------------------------------------------------------------------------------
|
||||
diff --git a/src/Control/Lens/Operators.hs b/src/Control/Lens/Operators.hs
|
||||
index 9992e63..631e8e6 100644
|
||||
index 302f68e..1625fe5 100644
|
||||
--- a/src/Control/Lens/Operators.hs
|
||||
+++ b/src/Control/Lens/Operators.hs
|
||||
@@ -111,7 +111,7 @@ module Control.Lens.Operators
|
||||
@@ -104,7 +104,7 @@ module Control.Lens.Operators
|
||||
, (<#~)
|
||||
, (<#=)
|
||||
-- * "Control.Lens.Plated"
|
||||
|
@ -201,12 +177,12 @@ index 9992e63..631e8e6 100644
|
|||
, ( # )
|
||||
-- * "Control.Lens.Setter"
|
||||
diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs
|
||||
index b75c870..c6c6596 100644
|
||||
index 36152d6..3af6bd3 100644
|
||||
--- a/src/Control/Lens/Prism.hs
|
||||
+++ b/src/Control/Lens/Prism.hs
|
||||
@@ -61,8 +61,6 @@ import Unsafe.Coerce
|
||||
import Data.Profunctor.Unsafe
|
||||
@@ -62,8 +62,6 @@ import Data.Profunctor.Unsafe
|
||||
#endif
|
||||
import Prelude
|
||||
|
||||
-{-# ANN module "HLint: ignore Use camelCase" #-}
|
||||
-
|
||||
|
@ -214,17 +190,17 @@ index b75c870..c6c6596 100644
|
|||
-- >>> :set -XNoOverloadedStrings
|
||||
-- >>> import Control.Lens
|
||||
diff --git a/src/Control/Monad/Primitive/Lens.hs b/src/Control/Monad/Primitive/Lens.hs
|
||||
index ee942c6..2f37134 100644
|
||||
index 8f1ec94..482764a 100644
|
||||
--- a/src/Control/Monad/Primitive/Lens.hs
|
||||
+++ b/src/Control/Monad/Primitive/Lens.hs
|
||||
@@ -20,7 +20,6 @@ import Control.Lens
|
||||
import Control.Monad.Primitive (PrimMonad(..))
|
||||
@@ -26,7 +26,6 @@ import Control.Lens
|
||||
import Control.Monad.Primitive
|
||||
import GHC.Prim (State#)
|
||||
|
||||
-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}
|
||||
|
||||
prim :: (PrimMonad m) => Iso' (m a) (State# (PrimState m) -> (# State# (PrimState m), a #))
|
||||
prim = iso internal primitive
|
||||
#if MIN_VERSION_primitive(0,6,0)
|
||||
prim :: PrimBase m => Iso' (m a) (State# (PrimState m) -> (# State# (PrimState m), a #))
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,8 @@
|
|||
From 3aef808eee43c973ae1fbf6e8769d89b7f0d355b Mon Sep 17 00:00:00 2001
|
||||
From a020dd27eda45263db6ac887df4a94efb6ca86db Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Tue, 10 Jun 2014 14:47:42 +0000
|
||||
Date: Thu, 2 Jul 2015 21:36:02 +0000
|
||||
Subject: [PATCH] deal with TH
|
||||
|
||||
Export modules referenced by it.
|
||||
|
||||
Should not need these icons in git-annex, so not worth using the Evil
|
||||
Splicer.
|
||||
---
|
||||
Network/Wai/Application/Static.hs | 4 ----
|
||||
WaiAppStatic/Storage/Embedded.hs | 8 ++++----
|
||||
|
@ -14,10 +10,10 @@ Splicer.
|
|||
3 files changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
|
||||
index db2b835..b2c1aec 100644
|
||||
index 228582d..7d72bb0 100644
|
||||
--- a/Network/Wai/Application/Static.hs
|
||||
+++ b/Network/Wai/Application/Static.hs
|
||||
@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO)
|
||||
@@ -34,8 +34,6 @@ import Control.Monad.IO.Class (liftIO)
|
||||
|
||||
import Blaze.ByteString.Builder (toByteString)
|
||||
|
||||
|
@ -26,10 +22,10 @@ index db2b835..b2c1aec 100644
|
|||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -198,8 +196,6 @@ staticAppPieces _ _ req sendResponse
|
||||
@@ -218,8 +216,6 @@ staticAppPieces _ _ req sendResponse
|
||||
H.status405
|
||||
[("Content-Type", "text/plain")]
|
||||
"Only GET is supported"
|
||||
"Only GET or HEAD is supported"
|
||||
-staticAppPieces _ [".hidden", "folder.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")]
|
||||
-staticAppPieces _ [".hidden", "haskell.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")]
|
||||
staticAppPieces ss rawPieces req sendResponse = liftIO $ do
|
||||
|
@ -55,10 +51,10 @@ index daa6e50..9873d4e 100644
|
|||
-import WaiAppStatic.Storage.Embedded.TH
|
||||
+--import WaiAppStatic.Storage.Embedded.TH
|
||||
diff --git a/wai-app-static.cabal b/wai-app-static.cabal
|
||||
index ef6f898..9a59d71 100644
|
||||
index 4cca237..3fbfcee 100644
|
||||
--- a/wai-app-static.cabal
|
||||
+++ b/wai-app-static.cabal
|
||||
@@ -33,7 +33,6 @@ library
|
||||
@@ -35,7 +35,6 @@ library
|
||||
, containers >= 0.2
|
||||
, time >= 1.1.4
|
||||
, old-locale >= 1.0.0.2
|
||||
|
@ -66,7 +62,7 @@ index ef6f898..9a59d71 100644
|
|||
, text >= 0.7
|
||||
, blaze-builder >= 0.2.1.4
|
||||
, base64-bytestring >= 0.1
|
||||
@@ -61,9 +60,8 @@ library
|
||||
@@ -63,9 +62,8 @@ library
|
||||
WaiAppStatic.Listing
|
||||
WaiAppStatic.Types
|
||||
WaiAppStatic.CmdLine
|
||||
|
@ -78,5 +74,5 @@ index ef6f898..9a59d71 100644
|
|||
extensions: CPP
|
||||
|
||||
--
|
||||
2.0.0
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From f1feea61dcba0b16afed5ce8dd5d2433fe505461 Mon Sep 17 00:00:00 2001
|
||||
From bec7dac77cc7fbe9a620c371d7c2cdbcf234eac6 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:15:23 +0000
|
||||
Date: Fri, 3 Jul 2015 00:39:53 +0000
|
||||
Subject: [PATCH] hack TH
|
||||
|
||||
---
|
||||
|
@ -15,7 +15,7 @@ Subject: [PATCH] hack TH
|
|||
8 files changed, 213 insertions(+), 288 deletions(-)
|
||||
|
||||
diff --git a/Yesod/Core.hs b/Yesod/Core.hs
|
||||
index 9b29317..7c0792d 100644
|
||||
index f7436e6..2fa62cc 100644
|
||||
--- a/Yesod/Core.hs
|
||||
+++ b/Yesod/Core.hs
|
||||
@@ -31,16 +31,16 @@ module Yesod.Core
|
||||
|
@ -45,7 +45,7 @@ index 9b29317..7c0792d 100644
|
|||
-- * Sessions
|
||||
, SessionBackend (..)
|
||||
, customizeSessionCookies
|
||||
@@ -87,17 +87,15 @@ module Yesod.Core
|
||||
@@ -90,17 +90,15 @@ module Yesod.Core
|
||||
, readIntegral
|
||||
-- * Shakespeare
|
||||
-- ** Hamlet
|
||||
|
@ -68,10 +68,10 @@ index 9b29317..7c0792d 100644
|
|||
, renderCssUrl
|
||||
) where
|
||||
diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs
|
||||
index 8631d27..c40eb10 100644
|
||||
index c2e707a..b594353 100644
|
||||
--- a/Yesod/Core/Class/Yesod.hs
|
||||
+++ b/Yesod/Core/Class/Yesod.hs
|
||||
@@ -5,18 +5,22 @@
|
||||
@@ -5,11 +5,15 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Yesod.Core.Class.Yesod where
|
||||
|
||||
|
@ -88,15 +88,16 @@ index 8631d27..c40eb10 100644
|
|||
|
||||
import Blaze.ByteString.Builder (Builder)
|
||||
import Blaze.ByteString.Builder.Char.Utf8 (fromText)
|
||||
import Control.Arrow ((***), second)
|
||||
@@ -18,7 +22,7 @@ import Control.Exception (bracket)
|
||||
import Control.Monad (forM, when, void)
|
||||
import Control.Monad.IO.Class (MonadIO (liftIO))
|
||||
-import Control.Monad.Logger (LogLevel (LevelInfo, LevelOther),
|
||||
+import Control.Monad.Logger (Loc, LogLevel (LevelInfo, LevelOther),
|
||||
LogSource)
|
||||
import Control.Monad.Logger (LogLevel (LevelInfo, LevelOther),
|
||||
- LogSource)
|
||||
+ LogSource, Loc)
|
||||
import Control.Monad.Trans.Resource (InternalState, createInternalState, closeInternalState)
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
@@ -33,7 +37,6 @@ import qualified Data.Text.Encoding.Error as TEE
|
||||
@@ -35,7 +39,6 @@ import qualified Data.Text.Encoding.Error as TEE
|
||||
import Data.Text.Lazy.Builder (toLazyText)
|
||||
import Data.Text.Lazy.Encoding (encodeUtf8)
|
||||
import Data.Word (Word64)
|
||||
|
@ -104,7 +105,7 @@ index 8631d27..c40eb10 100644
|
|||
import Network.HTTP.Types (encodePath)
|
||||
import qualified Network.Wai as W
|
||||
import Data.Default (def)
|
||||
@@ -94,18 +97,26 @@ class RenderRoute site => Yesod site where
|
||||
@@ -87,18 +90,26 @@ class RenderRoute site => Yesod site where
|
||||
defaultLayout w = do
|
||||
p <- widgetToPageContent w
|
||||
mmsg <- getMessage
|
||||
|
@ -143,7 +144,7 @@ index 8631d27..c40eb10 100644
|
|||
|
||||
-- | Override the rendering function for a particular URL. One use case for
|
||||
-- this is to offload static hosting to a different domain name to avoid
|
||||
@@ -374,45 +385,103 @@ widgetToPageContent w = do
|
||||
@@ -410,45 +421,103 @@ widgetToPageContent w = do
|
||||
-- modernizr should be at the end of the <head> http://www.modernizr.com/docs/#installing
|
||||
-- the asynchronous loader means your page doesn't have to wait for all the js to load
|
||||
let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc
|
||||
|
@ -286,7 +287,7 @@ index 8631d27..c40eb10 100644
|
|||
|
||||
return $ PageContent title headAll $
|
||||
case jsLoader master of
|
||||
@@ -442,10 +511,13 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
@@ -478,10 +547,13 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
r <- waiRequest
|
||||
let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r
|
||||
setTitle "Not Found"
|
||||
|
@ -304,7 +305,7 @@ index 8631d27..c40eb10 100644
|
|||
provideRep $ return $ object ["message" .= ("Not Found" :: Text)]
|
||||
|
||||
-- For API requests.
|
||||
@@ -455,10 +527,11 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
@@ -491,10 +563,11 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
defaultErrorHandler NotAuthenticated = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Not logged in"
|
||||
|
@ -320,7 +321,7 @@ index 8631d27..c40eb10 100644
|
|||
|
||||
provideRep $ do
|
||||
-- 401 *MUST* include a WWW-Authenticate header
|
||||
@@ -480,10 +553,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do
|
||||
@@ -516,10 +589,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do
|
||||
defaultErrorHandler (PermissionDenied msg) = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Permission Denied"
|
||||
|
@ -338,7 +339,7 @@ index 8631d27..c40eb10 100644
|
|||
provideRep $
|
||||
return $ object $ [
|
||||
"message" .= ("Permission Denied. " <> msg)
|
||||
@@ -492,30 +568,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do
|
||||
@@ -528,30 +604,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do
|
||||
defaultErrorHandler (InvalidArgs ia) = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Invalid Arguments"
|
||||
|
@ -396,7 +397,7 @@ index 8631d27..c40eb10 100644
|
|||
provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= TE.decodeUtf8With TEE.lenientDecode m]
|
||||
|
||||
asyncHelper :: (url -> [x] -> Text)
|
||||
@@ -682,8 +770,4 @@ loadClientSession key getCachedDate sessionName req = load
|
||||
@@ -718,8 +806,4 @@ loadClientSession key getCachedDate sessionName req = load
|
||||
-- turn the TH Loc loaction information into a human readable string
|
||||
-- leaving out the loc_end parameter
|
||||
fileLocationToString :: Loc -> String
|
||||
|
@ -407,7 +408,7 @@ index 8631d27..c40eb10 100644
|
|||
- char = show . snd . loc_start
|
||||
+fileLocationToString loc = "unknown"
|
||||
diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs
|
||||
index e0d1f0e..cc23fdd 100644
|
||||
index 7e43f74..625a901 100644
|
||||
--- a/Yesod/Core/Dispatch.hs
|
||||
+++ b/Yesod/Core/Dispatch.hs
|
||||
@@ -1,4 +1,3 @@
|
||||
|
@ -444,9 +445,9 @@ index e0d1f0e..cc23fdd 100644
|
|||
, PathMultiPiece (..)
|
||||
, Texts
|
||||
-- * Convert to WAI
|
||||
@@ -135,13 +134,6 @@ toWaiAppLogger logger site = do
|
||||
, yreSite = site
|
||||
@@ -141,13 +140,6 @@ toWaiAppLogger logger site = do
|
||||
, yreSessionBackend = sb
|
||||
, yreGen = gen
|
||||
}
|
||||
- messageLoggerSource
|
||||
- site
|
||||
|
@ -458,10 +459,10 @@ index e0d1f0e..cc23fdd 100644
|
|||
middleware <- mkDefaultMiddlewares logger
|
||||
return $ middleware $ toWaiAppYre yre
|
||||
|
||||
@@ -170,14 +162,7 @@ warp port site = do
|
||||
]
|
||||
-}
|
||||
, Network.Wai.Handler.Warp.settingsOnException = const $ \e ->
|
||||
@@ -167,14 +159,7 @@ warp port site = do
|
||||
Network.Wai.Handler.Warp.setPort port $
|
||||
Network.Wai.Handler.Warp.setServerName serverValue $
|
||||
Network.Wai.Handler.Warp.setOnException (\_ e ->
|
||||
- when (shouldLog' e) $
|
||||
- messageLoggerSource
|
||||
- site
|
||||
|
@ -469,12 +470,12 @@ index e0d1f0e..cc23fdd 100644
|
|||
- $(qLocation >>= liftLoc)
|
||||
- "yesod-core"
|
||||
- LevelError
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e)
|
||||
+ when (shouldLog' e) $ error (show e)
|
||||
}
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e)) $
|
||||
+ when (shouldLog' e) $ error (show e)) $
|
||||
Network.Wai.Handler.Warp.defaultSettings)
|
||||
where
|
||||
shouldLog' =
|
||||
@@ -211,7 +196,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr
|
||||
shouldLog' = Network.Wai.Handler.Warp.defaultShouldDisplayException
|
||||
@@ -208,7 +193,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr
|
||||
-- | Deprecated synonym for 'warp'.
|
||||
warpDebug :: YesodDispatch site => Int -> site -> IO ()
|
||||
warpDebug = warp
|
||||
|
@ -483,10 +484,10 @@ index e0d1f0e..cc23fdd 100644
|
|||
-- | Runs your application using default middlewares (i.e., via 'toWaiApp'). It
|
||||
-- reads port information from the PORT environment variable, as used by tools
|
||||
diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs
|
||||
index d2b196b..13cac17 100644
|
||||
index 19f4152..c97fb24 100644
|
||||
--- a/Yesod/Core/Handler.hs
|
||||
+++ b/Yesod/Core/Handler.hs
|
||||
@@ -174,7 +174,7 @@ import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
|
||||
@@ -178,7 +178,7 @@ import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
|
||||
import Data.Text.Encoding.Error (lenientDecode)
|
||||
import qualified Data.Text.Lazy as TL
|
||||
import qualified Text.Blaze.Html.Renderer.Text as RenderText
|
||||
|
@ -495,7 +496,7 @@ index d2b196b..13cac17 100644
|
|||
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
@@ -203,6 +203,7 @@ import Control.Exception (throwIO)
|
||||
@@ -206,6 +206,7 @@ import Control.Exception (throwIO)
|
||||
import Blaze.ByteString.Builder (Builder)
|
||||
import Safe (headMay)
|
||||
import Data.CaseInsensitive (CI)
|
||||
|
@ -503,7 +504,7 @@ index d2b196b..13cac17 100644
|
|||
import qualified Data.Conduit.List as CL
|
||||
import Control.Monad (unless)
|
||||
import Control.Monad.Trans.Resource (MonadResource, InternalState, runResourceT, withInternalState, getInternalState, liftResourceT, resourceForkIO
|
||||
@@ -855,19 +856,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)
|
||||
@@ -848,19 +849,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)
|
||||
-> m a
|
||||
redirectToPost url = do
|
||||
urlText <- toTextUrl url
|
||||
|
@ -533,7 +534,7 @@ index d2b196b..13cac17 100644
|
|||
-- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.
|
||||
hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html
|
||||
diff --git a/Yesod/Core/Internal/Run.hs b/Yesod/Core/Internal/Run.hs
|
||||
index 311f208..63f666f 100644
|
||||
index 651c11c..46e1d2a 100644
|
||||
--- a/Yesod/Core/Internal/Run.hs
|
||||
+++ b/Yesod/Core/Internal/Run.hs
|
||||
@@ -16,7 +16,7 @@ import Control.Exception.Lifted (catch)
|
||||
|
@ -543,18 +544,18 @@ index 311f208..63f666f 100644
|
|||
-import Control.Monad.Logger (LogLevel (LevelError), LogSource,
|
||||
+import Control.Monad.Logger (Loc, LogLevel (LevelError), LogSource,
|
||||
liftLoc)
|
||||
import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState)
|
||||
import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState)
|
||||
import qualified Data.ByteString as S
|
||||
@@ -31,7 +31,7 @@ import qualified Data.Text as T
|
||||
import Data.Text.Encoding (encodeUtf8)
|
||||
@@ -32,7 +32,7 @@ import Data.Text.Encoding (encodeUtf8)
|
||||
import Data.Text.Encoding (decodeUtf8With)
|
||||
import Data.Text.Encoding.Error (lenientDecode)
|
||||
import Data.Time (getCurrentTime, addUTCTime)
|
||||
-import Language.Haskell.TH.Syntax (Loc, qLocation)
|
||||
+import Language.Haskell.TH.Syntax (qLocation)
|
||||
import qualified Network.HTTP.Types as H
|
||||
import Network.Wai
|
||||
#if MIN_VERSION_wai(2, 0, 0)
|
||||
@@ -158,8 +158,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
import Network.Wai.Internal
|
||||
@@ -160,8 +160,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
-> ErrorResponse
|
||||
-> YesodApp
|
||||
safeEh log' er req = do
|
||||
|
@ -683,26 +684,26 @@ index 7e84c1c..a273c29 100644
|
|||
- ]
|
||||
- return $ LetE [fun] (VarE helper)
|
||||
diff --git a/Yesod/Core/Types.hs b/Yesod/Core/Types.hs
|
||||
index 388dfe3..b3fce0f 100644
|
||||
index 5fa5c3d..1646d54 100644
|
||||
--- a/Yesod/Core/Types.hs
|
||||
+++ b/Yesod/Core/Types.hs
|
||||
@@ -21,6 +21,7 @@ import Control.Monad.Catch (MonadCatch (..))
|
||||
@@ -19,6 +19,7 @@ import Control.Monad.Base (MonadBase (liftBase))
|
||||
import Control.Monad.Catch (MonadCatch (..))
|
||||
import Control.Monad.Catch (MonadMask (..))
|
||||
#endif
|
||||
import Control.Monad.IO.Class (MonadIO (liftIO))
|
||||
+import qualified Control.Monad.Logger
|
||||
import Control.Monad.Logger (LogLevel, LogSource,
|
||||
MonadLogger (..))
|
||||
import Control.Monad.Trans.Control (MonadBaseControl (..))
|
||||
@@ -191,7 +192,7 @@ data RunHandlerEnv site = RunHandlerEnv
|
||||
@@ -179,7 +180,7 @@ data RunHandlerEnv site = RunHandlerEnv
|
||||
, rheRoute :: !(Maybe (Route site))
|
||||
, rheSite :: !site
|
||||
, rheUpload :: !(RequestBodyLength -> FileUpload)
|
||||
- , rheLog :: !(Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
+ , rheLog :: !(Control.Monad.Logger.Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
, rheOnError :: !(ErrorResponse -> YesodApp)
|
||||
, rheGetMaxExpires :: IO Text
|
||||
-- ^ How to respond when an error is thrown internally.
|
||||
--
|
||||
diff --git a/Yesod/Core/Widget.hs b/Yesod/Core/Widget.hs
|
||||
index 481199e..8489fbe 100644
|
||||
--- a/Yesod/Core/Widget.hs
|
||||
|
@ -764,5 +765,5 @@ index 481199e..8489fbe 100644
|
|||
ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message)
|
||||
=> HtmlUrlI18n message (Route (HandlerSite m))
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
From e82ed4e6fd7b5ea6dbe474b5de2755ec5794161c Mon Sep 17 00:00:00 2001
|
||||
From 4d8650bd806f50aa2538270f80fa93261c43d056 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:23:50 +0000
|
||||
Date: Fri, 3 Jul 2015 00:12:02 +0000
|
||||
Subject: [PATCH] stub out
|
||||
|
||||
---
|
||||
|
@ -8,16 +8,16 @@ Subject: [PATCH] stub out
|
|||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/yesod-persistent.cabal b/yesod-persistent.cabal
|
||||
index b116f3a..017b184 100644
|
||||
index c3bc1bf..1727dba 100644
|
||||
--- a/yesod-persistent.cabal
|
||||
+++ b/yesod-persistent.cabal
|
||||
@@ -14,16 +14,6 @@ description: Some helpers for using Persistent from Yesod.
|
||||
@@ -15,16 +15,6 @@ extra-source-files: README.md ChangeLog.md
|
||||
|
||||
library
|
||||
build-depends: base >= 4 && < 5
|
||||
- , yesod-core >= 1.2.2 && < 1.3
|
||||
- , persistent >= 1.2 && < 2.1
|
||||
- , persistent-template >= 1.2 && < 2.1
|
||||
- , yesod-core >= 1.4.0 && < 1.5
|
||||
- , persistent >= 2.1 && < 2.2
|
||||
- , persistent-template >= 2.1 && < 2.2
|
||||
- , transformers >= 0.2.2
|
||||
- , blaze-builder
|
||||
- , conduit
|
||||
|
@ -29,5 +29,5 @@ index b116f3a..017b184 100644
|
|||
|
||||
test-suite test
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 606c5f4f4b2d476d274907eb2bb8c12b60fc451f Mon Sep 17 00:00:00 2001
|
||||
From 09d7340ff4c9b43f7c8c2ad6529a6c60871d265f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 21 May 2014 04:43:30 +0000
|
||||
Date: Fri, 3 Jul 2015 01:39:14 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
|
@ -31,7 +31,7 @@ index 08febb9..e3a6d51 100644
|
|||
-- | Use <https://github.com/mishoo/UglifyJS2 UglifyJS2> to compress javascript.
|
||||
-- Assumes @uglifyjs@ is located in the path and uses options @[\"-m\", \"-c\"]@
|
||||
diff --git a/Yesod/Static.hs b/Yesod/Static.hs
|
||||
index 725ebf4..33eaffd 100644
|
||||
index a18d88e..afb1cda 100644
|
||||
--- a/Yesod/Static.hs
|
||||
+++ b/Yesod/Static.hs
|
||||
@@ -37,8 +37,8 @@ module Yesod.Static
|
||||
|
@ -99,7 +99,7 @@ index 725ebf4..33eaffd 100644
|
|||
@@ -267,7 +270,7 @@ staticFilesList dir fs =
|
||||
-- see if their copy is up-to-date.
|
||||
publicFiles :: Prelude.FilePath -> Q [Dec]
|
||||
publicFiles dir = mkStaticFiles' dir "StaticRoute" False
|
||||
publicFiles dir = mkStaticFiles' dir False
|
||||
-
|
||||
+-}
|
||||
|
||||
|
@ -111,17 +111,17 @@ index 725ebf4..33eaffd 100644
|
|||
|
||||
+{-
|
||||
mkStaticFiles :: Prelude.FilePath -> Q [Dec]
|
||||
mkStaticFiles fp = mkStaticFiles' fp "StaticRoute" True
|
||||
mkStaticFiles fp = mkStaticFiles' fp True
|
||||
|
||||
@@ -357,6 +361,7 @@ mkStaticFilesList fp fs routeConName makeHash = do
|
||||
[ Clause [] (NormalB $ (ConE route) `AppE` f' `AppE` qs) []
|
||||
@@ -354,6 +358,7 @@ mkStaticFilesList fp fs makeHash = do
|
||||
[ Clause [] (NormalB $ (ConE 'StaticRoute) `AppE` f' `AppE` qs) []
|
||||
]
|
||||
]
|
||||
+-}
|
||||
|
||||
base64md5File :: Prelude.FilePath -> IO String
|
||||
base64md5File = fmap (base64 . encode) . hashFile
|
||||
@@ -395,7 +400,7 @@ base64 = map tr
|
||||
@@ -392,7 +397,7 @@ base64 = map tr
|
||||
-- single static file at compile time.
|
||||
|
||||
data CombineType = JS | CSS
|
||||
|
@ -130,7 +130,7 @@ index 725ebf4..33eaffd 100644
|
|||
combineStatics' :: CombineType
|
||||
-> CombineSettings
|
||||
-> [Route Static] -- ^ files to combine
|
||||
@@ -429,7 +434,7 @@ combineStatics' combineType CombineSettings {..} routes = do
|
||||
@@ -426,7 +431,7 @@ combineStatics' combineType CombineSettings {..} routes = do
|
||||
case combineType of
|
||||
JS -> "js"
|
||||
CSS -> "css"
|
||||
|
@ -139,7 +139,7 @@ index 725ebf4..33eaffd 100644
|
|||
-- | Data type for holding all settings for combining files.
|
||||
--
|
||||
-- This data type is a settings type. For more information, see:
|
||||
@@ -505,6 +510,7 @@ instance Default CombineSettings where
|
||||
@@ -502,6 +507,7 @@ instance Default CombineSettings where
|
||||
errorIntro :: [FilePath] -> [Char] -> [Char]
|
||||
errorIntro fps s = "Error minifying " ++ show fps ++ ": " ++ s
|
||||
|
||||
|
@ -147,7 +147,7 @@ index 725ebf4..33eaffd 100644
|
|||
liftRoutes :: [Route Static] -> Q Exp
|
||||
liftRoutes =
|
||||
fmap ListE . mapM go
|
||||
@@ -551,4 +557,5 @@ combineScripts' :: Bool -- ^ development? if so, perform no combining
|
||||
@@ -548,4 +554,5 @@ combineScripts' :: Bool -- ^ development? if so, perform no combining
|
||||
-> Q Exp
|
||||
combineScripts' development cs con routes
|
||||
| development = [| mapM_ (addScript . $(return $ ConE con)) $(liftRoutes routes) |]
|
||||
|
@ -155,18 +155,18 @@ index 725ebf4..33eaffd 100644
|
|||
+ | otherwise = [| addScript $ $(return $ ConE con) $(combineStatics' JS cs routes) |]a
|
||||
+-}
|
||||
diff --git a/yesod-static.cabal b/yesod-static.cabal
|
||||
index 2582a95..5df03b3 100644
|
||||
index 4ccb0d7..8758aaa 100644
|
||||
--- a/yesod-static.cabal
|
||||
+++ b/yesod-static.cabal
|
||||
@@ -49,7 +49,6 @@ library
|
||||
@@ -50,7 +50,6 @@ library
|
||||
, system-fileio >= 0.3
|
||||
, data-default
|
||||
, shakespeare-css >= 1.0.3
|
||||
, mime-types >= 0.1
|
||||
- , hjsmin
|
||||
, filepath >= 1.3
|
||||
, resourcet >= 0.4
|
||||
, unordered-containers >= 0.2
|
||||
@@ -62,13 +61,6 @@ library
|
||||
@@ -63,13 +62,6 @@ library
|
||||
, hashable >= 1.1
|
||||
|
||||
exposed-modules: Yesod.Static
|
||||
|
@ -181,13 +181,13 @@ index 2582a95..5df03b3 100644
|
|||
ghc-options: -Wall
|
||||
extensions: TemplateHaskell
|
||||
@@ -108,7 +100,6 @@ test-suite tests
|
||||
, system-fileio
|
||||
, data-default
|
||||
, shakespeare-css
|
||||
, mime-types
|
||||
- , hjsmin
|
||||
, filepath
|
||||
, resourcet
|
||||
, unordered-containers
|
||||
--
|
||||
2.0.0.rc2
|
||||
2.1.4
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
From 59091cd37958fee79b9e346fe3118d5ed7d0104b Mon Sep 17 00:00:00 2001
|
||||
From 86e7cf433fcd3386893556d690748781f46d3f03 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:36:37 +0000
|
||||
Date: Fri, 3 Jul 2015 01:33:03 +0000
|
||||
Subject: [PATCH] hack TH
|
||||
|
||||
---
|
||||
Yesod.hs | 19 ++++++++++++--
|
||||
Yesod/Default/Main.hs | 31 +----------------------
|
||||
Yesod/Default/Util.hs | 69 ++-------------------------------------------------
|
||||
3 files changed, 20 insertions(+), 99 deletions(-)
|
||||
Yesod/Default/Main.hs | 28 +--------------------
|
||||
Yesod/Default/Util.hs | 68 ++-------------------------------------------------
|
||||
3 files changed, 20 insertions(+), 95 deletions(-)
|
||||
|
||||
diff --git a/Yesod.hs b/Yesod.hs
|
||||
index b367144..fbe309c 100644
|
||||
|
@ -41,7 +41,7 @@ index b367144..fbe309c 100644
|
|||
+insert = undefined
|
||||
+
|
||||
diff --git a/Yesod/Default/Main.hs b/Yesod/Default/Main.hs
|
||||
index 565ed35..bf46642 100644
|
||||
index 2694825..5a5fbb9 100644
|
||||
--- a/Yesod/Default/Main.hs
|
||||
+++ b/Yesod/Default/Main.hs
|
||||
@@ -1,10 +1,8 @@
|
||||
|
@ -64,7 +64,7 @@ index 565ed35..bf46642 100644
|
|||
import System.Log.FastLogger (LogStr, toLogStr)
|
||||
import Language.Haskell.TH.Syntax (qLocation)
|
||||
|
||||
@@ -55,33 +53,6 @@ defaultMain load getApp = do
|
||||
@@ -56,30 +54,6 @@ defaultMain load getApp = do
|
||||
|
||||
type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
|
||||
|
||||
|
@ -79,27 +79,24 @@ index 565ed35..bf46642 100644
|
|||
-defaultMainLog load getApp = do
|
||||
- config <- load
|
||||
- (app, logFunc) <- getApp config
|
||||
- runSettings defaultSettings
|
||||
- { settingsPort = appPort config
|
||||
- , settingsHost = appHost config
|
||||
- , settingsOnException = const $ \e -> when (shouldLog' e) $ logFunc
|
||||
- runSettings
|
||||
- ( setPort (appPort config)
|
||||
- $ setHost (appHost config)
|
||||
- $ setOnException (const $ \e -> when (shouldLog' e) $ logFunc
|
||||
- $(qLocation >>= liftLoc)
|
||||
- "yesod"
|
||||
- LevelError
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e)
|
||||
- } app
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e))
|
||||
- $ defaultSettings
|
||||
- ) app
|
||||
- where
|
||||
- shouldLog' =
|
||||
-#if MIN_VERSION_warp(2,1,3)
|
||||
- Warp.defaultShouldDisplayException
|
||||
-#else
|
||||
- const True
|
||||
-#endif
|
||||
|
||||
- shouldLog' = Warp.defaultShouldDisplayException
|
||||
-
|
||||
-- | Run your application continously, listening for SIGINT and exiting
|
||||
-- when received
|
||||
--
|
||||
diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs
|
||||
index a10358e..0547424 100644
|
||||
index 488312a..5476b54 100644
|
||||
--- a/Yesod/Default/Util.hs
|
||||
+++ b/Yesod/Default/Util.hs
|
||||
@@ -5,10 +5,9 @@
|
||||
|
@ -125,7 +122,7 @@ index a10358e..0547424 100644
|
|||
import Text.Hamlet (HamletSettings, defaultHamletSettings)
|
||||
import Data.Maybe (catMaybes)
|
||||
import Data.Default (Default (def))
|
||||
@@ -69,68 +65,7 @@ data TemplateLanguage = TemplateLanguage
|
||||
@@ -69,68 +65,8 @@ data TemplateLanguage = TemplateLanguage
|
||||
, tlReload :: FilePath -> Q Exp
|
||||
}
|
||||
|
||||
|
@ -143,7 +140,7 @@ index a10358e..0547424 100644
|
|||
{ wfsLanguages :: HamletSettings -> [TemplateLanguage]
|
||||
, wfsHamletSettings :: HamletSettings
|
||||
}
|
||||
-
|
||||
|
||||
-instance Default WidgetFileSettings where
|
||||
- def = WidgetFileSettings defaultTemplateLanguages defaultHamletSettings
|
||||
-
|
||||
|
@ -162,7 +159,7 @@ index a10358e..0547424 100644
|
|||
- , func
|
||||
- , " on "
|
||||
- , show file
|
||||
- , ", but no template were found."
|
||||
- , ", but no templates were found."
|
||||
- ]
|
||||
- exps -> return $ DoE $ map NoBindS exps
|
||||
- where
|
||||
|
@ -195,5 +192,5 @@ index a10358e..0547424 100644
|
|||
- else return $ Just ex
|
||||
- else return Nothing
|
||||
--
|
||||
2.1.1
|
||||
2.1.4
|
||||
|
||||
|
|
Loading…
Reference in a new issue