diff options
Diffstat (limited to 'standalone/no-th/haskell-patches/yesod-core_expand_TH.patch')
-rw-r--r-- | standalone/no-th/haskell-patches/yesod-core_expand_TH.patch | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch b/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch index 5609fb459..137c550fc 100644 --- a/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch +++ b/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch @@ -1,25 +1,25 @@ -From be8d5895522da0397fd594d5553ed7d3641eb399 Mon Sep 17 00:00:00 2001 +From 8dd61c7ea1b852957c74dc264004a6f7d70044a9 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Fri, 7 Mar 2014 01:40:29 +0000 +Date: Tue, 20 May 2014 21:39:04 +0000 Subject: [PATCH] remove and expand TH fix Loc from MonadLogger --- Yesod/Core.hs | 30 +++--- Yesod/Core/Class/Yesod.hs | 257 ++++++++++++++++++++++++++++++--------------- - Yesod/Core/Dispatch.hs | 37 ++----- + Yesod/Core/Dispatch.hs | 38 ++----- Yesod/Core/Handler.hs | 25 ++--- Yesod/Core/Internal/Run.hs | 8 +- Yesod/Core/Internal/TH.hs | 111 -------------------- Yesod/Core/Types.hs | 3 +- Yesod/Core/Widget.hs | 32 +----- - 8 files changed, 215 insertions(+), 288 deletions(-) + 8 files changed, 215 insertions(+), 289 deletions(-) diff --git a/Yesod/Core.hs b/Yesod/Core.hs -index 12e59d5..2817a69 100644 +index 9b29317..7c0792d 100644 --- a/Yesod/Core.hs +++ b/Yesod/Core.hs -@@ -29,16 +29,16 @@ module Yesod.Core +@@ -31,16 +31,16 @@ module Yesod.Core , unauthorizedI -- * Logging , LogLevel (..) @@ -46,7 +46,7 @@ index 12e59d5..2817a69 100644 -- * Sessions , SessionBackend (..) , customizeSessionCookies -@@ -85,17 +85,15 @@ module Yesod.Core +@@ -87,17 +87,15 @@ module Yesod.Core , readIntegral -- * Shakespeare -- ** Hamlet @@ -409,7 +409,7 @@ index 140600b..75daabc 100644 - char = show . snd . loc_start +fileLocationToString loc = "unknown" diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs -index e6f489d..3ff37c1 100644 +index 59663a8..9408a95 100644 --- a/Yesod/Core/Dispatch.hs +++ b/Yesod/Core/Dispatch.hs @@ -1,4 +1,3 @@ @@ -446,7 +446,7 @@ index e6f489d..3ff37c1 100644 , PathMultiPiece (..) , Texts -- * Convert to WAI -@@ -128,13 +127,6 @@ toWaiAppLogger logger site = do +@@ -130,13 +129,6 @@ toWaiAppLogger logger site = do , yreSite = site , yreSessionBackend = sb } @@ -460,10 +460,11 @@ index e6f489d..3ff37c1 100644 middleware <- mkDefaultMiddlewares logger return $ middleware $ toWaiAppYre yre -@@ -163,13 +155,7 @@ warp port site = do +@@ -165,14 +157,7 @@ warp port site = do ] -} , Network.Wai.Handler.Warp.settingsOnException = const $ \e -> +- when (shouldLog' e) $ - messageLoggerSource - site - logger @@ -471,11 +472,11 @@ index e6f489d..3ff37c1 100644 - "yesod-core" - LevelError - (toLogStr $ "Exception from Warp: " ++ show e) -+ error (show e) ++ when (shouldLog' e) $ error (show e) } - - -- | A default set of middlewares. -@@ -194,7 +180,6 @@ mkDefaultMiddlewares logger = do + where + shouldLog' = +@@ -206,7 +191,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr -- | Deprecated synonym for 'warp'. warpDebug :: YesodDispatch site => Int -> site -> IO () warpDebug = warp @@ -484,10 +485,10 @@ index e6f489d..3ff37c1 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 7c561c5..847d475 100644 +index e5cbc44..d583607 100644 --- a/Yesod/Core/Handler.hs +++ b/Yesod/Core/Handler.hs -@@ -164,7 +164,7 @@ import Data.Text.Encoding (decodeUtf8With, encodeUtf8) +@@ -169,7 +169,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 @@ -496,15 +497,15 @@ index 7c561c5..847d475 100644 import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L -@@ -198,6 +198,7 @@ import Data.CaseInsensitive (CI) - #if MIN_VERSION_wai(2, 0, 0) - import qualified System.PosixCompat.Files as PC +@@ -550,6 +550,7 @@ sendFilePart ct fp off count = do + #else + handlerError $ HCSendFile ct fp $ Just $ W.FilePart off count #endif +import qualified Text.Blaze.Internal - get :: MonadHandler m => m GHState - get = liftHandlerT $ HandlerT $ I.readIORef . handlerState -@@ -748,19 +749,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) + -- | Bypass remaining handler code and output the given content with a 200 + -- status code. +@@ -806,19 +807,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) -> m a redirectToPost url = do urlText <- toTextUrl url @@ -534,11 +535,11 @@ index 7c561c5..847d475 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 10871a2..e8d1907 100644 +index 3e2e4e0..b92eadb 100644 --- a/Yesod/Core/Internal/Run.hs +++ b/Yesod/Core/Internal/Run.hs -@@ -15,8 +15,8 @@ import qualified Control.Exception as E - import Control.Exception.Lifted (catch) +@@ -16,8 +16,8 @@ import Control.Exception.Lifted (catch) + import Control.Monad (mplus) import Control.Monad.IO.Class (MonadIO) import Control.Monad.IO.Class (liftIO) -import Control.Monad.Logger (LogLevel (LevelError), LogSource, @@ -548,7 +549,7 @@ index 10871a2..e8d1907 100644 import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState) import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 -@@ -30,7 +30,7 @@ import qualified Data.Text as T +@@ -31,7 +31,7 @@ import qualified Data.Text as T import Data.Text.Encoding (encodeUtf8) import Data.Text.Encoding (decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode) @@ -557,7 +558,7 @@ index 10871a2..e8d1907 100644 import qualified Network.HTTP.Types as H import Network.Wai #if MIN_VERSION_wai(2, 0, 0) -@@ -131,8 +131,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) +@@ -157,8 +157,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) -> ErrorResponse -> YesodApp safeEh log' er req = do @@ -686,18 +687,18 @@ index 7e84c1c..a273c29 100644 - ] - return $ LetE [fun] (VarE helper) diff --git a/Yesod/Core/Types.hs b/Yesod/Core/Types.hs -index de09f78..9183a64 100644 +index 7e3fd0d..994d322 100644 --- a/Yesod/Core/Types.hs +++ b/Yesod/Core/Types.hs -@@ -17,6 +17,7 @@ import Control.Exception (Exception) - import Control.Monad (liftM, ap) - import Control.Monad.Base (MonadBase (liftBase)) +@@ -21,6 +21,7 @@ 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 (..)) -@@ -179,7 +180,7 @@ data RunHandlerEnv site = RunHandlerEnv +@@ -187,7 +188,7 @@ data RunHandlerEnv site = RunHandlerEnv , rheRoute :: !(Maybe (Route site)) , rheSite :: !site , rheUpload :: !(RequestBodyLength -> FileUpload) @@ -707,7 +708,7 @@ index de09f78..9183a64 100644 -- ^ How to respond when an error is thrown internally. -- diff --git a/Yesod/Core/Widget.hs b/Yesod/Core/Widget.hs -index a972efa..156cd45 100644 +index 481199e..8489fbe 100644 --- a/Yesod/Core/Widget.hs +++ b/Yesod/Core/Widget.hs @@ -16,8 +16,8 @@ module Yesod.Core.Widget @@ -730,7 +731,7 @@ index a972efa..156cd45 100644 , asWidgetT ) where -@@ -189,35 +189,9 @@ addScriptRemote = flip addScriptRemoteAttrs [] +@@ -207,35 +207,9 @@ addScriptRemote = flip addScriptRemoteAttrs [] addScriptRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m () addScriptRemoteAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Remote x) y) mempty mempty mempty mempty @@ -767,5 +768,5 @@ index a972efa..156cd45 100644 ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -- -1.9.0 +2.0.0.rc2 |