diff options
author | Joey Hess <joey@kitenet.net> | 2014-10-14 00:16:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-10-14 00:19:07 -0400 |
commit | 68ddda02769785cca60b3b114ddc091b9670889a (patch) | |
tree | 16605501a3b2182807974ba204783d789fab0b62 /standalone/no-th/haskell-patches | |
parent | cbf82dba2135acf4d36888421293a25dee636e1e (diff) |
refresh android and no-th haskell patches to latest package versions from cabal
Added a cabal.config file; the result of running cabal freeze.
It's not used yet (needs a newer cabal than is in debian stable),
but the plan is that once the autbuilders are swiched to jessie,
this can be used to make cabal install the same versions of packages
that this patch got building, and so avoid breaking every time eg, yesod is
upgraded.
This commit was sponsored by Daniel Atlas.
Diffstat (limited to 'standalone/no-th/haskell-patches')
9 files changed, 249 insertions, 148 deletions
diff --git a/standalone/no-th/haskell-patches/DAV_build-without-TH.patch b/standalone/no-th/haskell-patches/DAV_build-without-TH.patch index cc730ebbd..368d52593 100644 --- a/standalone/no-th/haskell-patches/DAV_build-without-TH.patch +++ b/standalone/no-th/haskell-patches/DAV_build-without-TH.patch @@ -1,16 +1,16 @@ -From 8e115228601a97b19d3f713ccf2d13f58838d927 Mon Sep 17 00:00:00 2001 +From 438479e3573d4a9fa2e001b8f7ec5f9a595d7514 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Mon, 26 May 2014 01:48:22 +0000 -Subject: [PATCH] expand TH +Date: Tue, 14 Oct 2014 03:48:07 +0000 +Subject: [PATCH] avoid TH --- - DAV.cabal | 24 +--- - Network/Protocol/HTTP/DAV.hs | 96 ++++++++++++---- + DAV.cabal | 25 +---- + Network/Protocol/HTTP/DAV.hs | 92 +++++++++++++--- Network/Protocol/HTTP/DAV/TH.hs | 232 ++++++++++++++++++++++++++++++++++++++- - 3 files changed, 307 insertions(+), 45 deletions(-) + 3 files changed, 306 insertions(+), 43 deletions(-) diff --git a/DAV.cabal b/DAV.cabal -index 5d50e39..f2abf89 100644 +index f8fdd40..92945c3 100644 --- a/DAV.cabal +++ b/DAV.cabal @@ -43,30 +43,7 @@ library @@ -26,7 +26,7 @@ index 5d50e39..f2abf89 100644 - , case-insensitive >= 0.4 - , containers - , data-default -- , either >= 4.1 +- , either >= 4.3 - , errors - , exceptions - , http-client >= 0.2 @@ -35,7 +35,7 @@ index 5d50e39..f2abf89 100644 - , lens >= 3.0 - , mtl >= 2.1 - , network >= 2.3 -- , optparse-applicative >= 0.5.0 +- , optparse-applicative >= 0.10.0 - , transformers >= 0.3 - , transformers-base - , utf8-string @@ -412,3 +412,6 @@ index 0ecd476..1653bf6 100644 + __userAgent_a3kh) + Data.Functor.<$> (_f_a3k7 __userAgent'_a3kg)) +{-# INLINE userAgent #-} +-- +1.7.10.4 + diff --git a/standalone/no-th/haskell-patches/optparse-applicative_remove-ANN.patch b/standalone/no-th/haskell-patches/optparse-applicative_remove-ANN.patch new file mode 100644 index 000000000..1bb843524 --- /dev/null +++ b/standalone/no-th/haskell-patches/optparse-applicative_remove-ANN.patch @@ -0,0 +1,33 @@ +From b128590966d4946219e45e2efd88acf7a354abc2 Mon Sep 17 00:00:00 2001 +From: androidbuilder <androidbuilder@example.com> +Date: Tue, 14 Oct 2014 02:28:02 +0000 +Subject: [PATCH] remove ANN + +--- + Options/Applicative.hs | 2 -- + Options/Applicative/Help/Core.hs | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/Options/Applicative.hs b/Options/Applicative.hs +index bd4129d..f412062 100644 +--- a/Options/Applicative.hs ++++ b/Options/Applicative.hs +@@ -34,5 +34,3 @@ import Options.Applicative.Common + import Options.Applicative.Builder + import Options.Applicative.Builder.Completer + import Options.Applicative.Extra +- +-{-# ANN module "HLint: ignore Use import/export shortcut" #-} +diff --git a/Options/Applicative/Help/Core.hs b/Options/Applicative/Help/Core.hs +index 0a79169..3f1ce3f 100644 +--- a/Options/Applicative/Help/Core.hs ++++ b/Options/Applicative/Help/Core.hs +@@ -139,5 +139,3 @@ parserUsage pprefs p progn = hsep + [ string "Usage:" + , string progn + , align (extractChunk (briefDesc pprefs p)) ] +- +-{-# ANN footerHelp "HLint: ignore Eta reduce" #-} +-- +1.7.10.4 + diff --git a/standalone/no-th/haskell-patches/persistent-template_stub-out.patch b/standalone/no-th/haskell-patches/persistent-template_stub-out.patch index 29002eb32..caa19074a 100644 --- a/standalone/no-th/haskell-patches/persistent-template_stub-out.patch +++ b/standalone/no-th/haskell-patches/persistent-template_stub-out.patch @@ -1,22 +1,22 @@ -From 4b958f97bffdeedc0c946d5fdc9749d2cc566fcc Mon Sep 17 00:00:00 2001 +From 97e13262aa53cd3cc4f3997ac9156007ca1b9ce0 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Thu, 26 Dec 2013 15:54:37 -0400 -Subject: [PATCH] stub out +Date: Tue, 14 Oct 2014 02:18:08 +0000 +Subject: [PATCH] unused --- persistent-template.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistent-template.cabal b/persistent-template.cabal -index c4aee68..7905278 100644 +index e247f6b..68184af 100644 --- a/persistent-template.cabal +++ b/persistent-template.cabal -@@ -24,7 +24,7 @@ library - , aeson - , monad-logger - , unordered-containers +@@ -29,7 +29,7 @@ library + , tagged + , path-pieces + , ghc-prim - exposed-modules: Database.Persist.TH -+ exposed-modules: ++ exposed-modules: ghc-options: -Wall if impl(ghc >= 7.4) cpp-options: -DGHC_7_4 diff --git a/standalone/no-th/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch b/standalone/no-th/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch index 7a66e1fd1..ecdf72da4 100644 --- a/standalone/no-th/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch +++ b/standalone/no-th/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch @@ -1,41 +1,43 @@ -From efd18199fa245e51e6137036062ded8b0b26f78c Mon Sep 17 00:00:00 2001 +From ec2543b2156dc968530ad98e33d26f741a479e31 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Tue, 17 Dec 2013 18:08:22 +0000 -Subject: [PATCH] disable TH +Date: Tue, 14 Oct 2014 01:23:56 +0000 +Subject: [PATCH] hack to build --- - Database/Persist/Sql/Raw.hs | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + Database/Persist/Sql/Raw.hs | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Database/Persist/Sql/Raw.hs b/Database/Persist/Sql/Raw.hs -index 73189dd..d432790 100644 +index 319d75f..db3ee43 100644 --- a/Database/Persist/Sql/Raw.hs +++ b/Database/Persist/Sql/Raw.hs -@@ -11,7 +11,7 @@ import Data.IORef (writeIORef, readIORef, newIORef) +@@ -15,7 +15,7 @@ import Data.IORef (writeIORef, readIORef, newIORef) import Control.Exception (throwIO) import Control.Monad (when, liftM) import Data.Text (Text, pack) --import Control.Monad.Logger (logDebugS) -+--import Control.Monad.Logger (logDebugS) +-import Control.Monad.Logger (logDebugS, runLoggingT) ++-- import Control.Monad.Logger (logDebugS, runLoggingT) import Data.Int (Int64) - import Control.Monad.Trans.Class (lift) import qualified Data.Text as T -@@ -22,7 +22,6 @@ rawQuery :: (MonadSqlPersist m, MonadResource m) - -> [PersistValue] - -> Source m [PersistValue] - rawQuery sql vals = do -- lift $ $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals - conn <- lift askSqlConn - bracketP - (getStmtConn conn sql) -@@ -34,7 +33,6 @@ rawExecute x y = liftM (const ()) $ rawExecuteCount x y - - rawExecuteCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64 + import Data.Conduit +@@ -39,8 +39,6 @@ rawQueryRes + rawQueryRes sql vals = do + conn <- ask + let make = do +- runLoggingT ($logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals) +- (connLogFunc conn) + getStmtConn conn sql + return $ do + stmt <- mkAcquire make stmtReset +@@ -52,8 +50,6 @@ rawExecute x y = liftM (const ()) $ rawExecuteCount x y + rawExecuteCount :: MonadIO m => Text -> [PersistValue] -> ReaderT Connection m Int64 rawExecuteCount sql vals = do -- $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals + conn <- ask +- runLoggingT ($logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals) +- (connLogFunc conn) stmt <- getStmt sql res <- liftIO $ stmtExecute stmt vals liftIO $ stmtReset stmt -- -1.8.5.1 +1.7.10.4 diff --git a/standalone/no-th/haskell-patches/process-conduit_avoid-TH.patch b/standalone/no-th/haskell-patches/process-conduit_avoid-TH.patch index 8fa07e85a..875119afd 100644 --- a/standalone/no-th/haskell-patches/process-conduit_avoid-TH.patch +++ b/standalone/no-th/haskell-patches/process-conduit_avoid-TH.patch @@ -1,24 +1,24 @@ -From 7e85a025349877565a70c375ef55508f215eaaf8 Mon Sep 17 00:00:00 2001 +From ed77588c57704030a9d412dd49f11c172c6268ab Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Wed, 21 May 2014 04:23:49 +0000 -Subject: [PATCH] remove TH +Date: Tue, 14 Oct 2014 03:46:03 +0000 +Subject: [PATCH] unused --- - process-conduit.cabal | 1 - + process-conduit.cabal | 1 - 1 file changed, 1 deletion(-) diff --git a/process-conduit.cabal b/process-conduit.cabal -index e6988e0..a2e03e0 100644 +index 34bb168..2f137a8 100644 --- a/process-conduit.cabal +++ b/process-conduit.cabal -@@ -24,7 +24,6 @@ source-repository head +@@ -22,7 +22,6 @@ source-repository head library - exposed-modules: Data.Conduit.Process + exposed-modules: Data.Conduit.ProcessOld - System.Process.QQ build-depends: base == 4.* , template-haskell >= 2.4 -- -2.0.0.rc2 +1.7.10.4 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 07663ac80..378043410 100644 --- a/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch +++ b/standalone/no-th/haskell-patches/yesod-core_expand_TH.patch @@ -1,18 +1,18 @@ -From 9feb37d13dc8449dc4445db83485780caee4b7ff Mon Sep 17 00:00:00 2001 +From e163ab104cf2f8d2bac07ab389caec49dfc39665 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Tue, 10 Jun 2014 17:44:52 +0000 +Date: Tue, 14 Oct 2014 02:49:19 +0000 Subject: [PATCH] expand and remove TH --- - Yesod/Core.hs | 30 +++--- - Yesod/Core/Class/Yesod.hs | 257 ++++++++++++++++++++++++++++++--------------- - 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(+), 289 deletions(-) + Yesod/Core.hs | 30 +++--- + Yesod/Core/Class/Yesod.hs | 256 +++++++++++++++++++++++++++++--------------- + Yesod/Core/Dispatch.hs | 38 ++----- + Yesod/Core/Handler.hs | 25 ++--- + Yesod/Core/Internal/Run.hs | 6 +- + Yesod/Core/Internal/TH.hs | 111 ------------------- + Yesod/Core/Types.hs | 3 +- + Yesod/Core/Widget.hs | 32 +----- + 8 files changed, 213 insertions(+), 288 deletions(-) diff --git a/Yesod/Core.hs b/Yesod/Core.hs index 9b29317..7c0792d 100644 @@ -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 140600b..75daabc 100644 +index 5dbaff2..edd98a5 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 140600b..75daabc 100644 import Blaze.ByteString.Builder (Builder) import Blaze.ByteString.Builder.Char.Utf8 (fromText) - import Control.Arrow ((***), second) +@@ -17,7 +21,7 @@ import Control.Arrow ((***), second) + 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.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,11 +105,11 @@ index 140600b..75daabc 100644 import Network.HTTP.Types (encodePath) import qualified Network.Wai as W import Data.Default (def) -@@ -94,18 +97,27 @@ class RenderRoute site => Yesod site where +@@ -87,18 +90,26 @@ class RenderRoute site => Yesod site where defaultLayout w = do p <- widgetToPageContent w mmsg <- getMessage -- giveUrlRenderer [hamlet| +- withUrlRenderer [hamlet| - $newline never - $doctype 5 - <html> @@ -120,7 +121,7 @@ index 140600b..75daabc 100644 - <p .message>#{msg} - ^{pageBody p} - |] -+ giveUrlRenderer $ \ _render_aHra ++ withUrlRenderer $ \ _render_aHra + -> do { id + ((Text.Blaze.Internal.preEscapedText . T.pack) + "<!DOCTYPE html>\n<html><head><title>"); @@ -140,11 +141,10 @@ index 140600b..75daabc 100644 + Text.Hamlet.asHtmlUrl (pageBody p) _render_aHra; + id + ((Text.Blaze.Internal.preEscapedText . T.pack) "</body></html>") } -+ -- | 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 +386,103 @@ widgetToPageContent w = do +@@ -373,45 +384,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 @@ -287,7 +287,7 @@ index 140600b..75daabc 100644 return $ PageContent title headAll $ case jsLoader master of -@@ -442,10 +512,13 @@ defaultErrorHandler NotFound = selectRep $ do +@@ -441,10 +510,13 @@ defaultErrorHandler NotFound = selectRep $ do r <- waiRequest let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r setTitle "Not Found" @@ -305,7 +305,7 @@ index 140600b..75daabc 100644 provideRep $ return $ object ["message" .= ("Not Found" :: Text)] -- For API requests. -@@ -455,10 +528,11 @@ defaultErrorHandler NotFound = selectRep $ do +@@ -454,10 +526,11 @@ defaultErrorHandler NotFound = selectRep $ do defaultErrorHandler NotAuthenticated = selectRep $ do provideRep $ defaultLayout $ do setTitle "Not logged in" @@ -321,7 +321,7 @@ index 140600b..75daabc 100644 provideRep $ do -- 401 *MUST* include a WWW-Authenticate header -@@ -480,10 +554,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do +@@ -479,10 +552,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do defaultErrorHandler (PermissionDenied msg) = selectRep $ do provideRep $ defaultLayout $ do setTitle "Permission Denied" @@ -339,7 +339,7 @@ index 140600b..75daabc 100644 provideRep $ return $ object $ [ "message" .= ("Permission Denied. " <> msg) -@@ -492,30 +569,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do +@@ -491,30 +567,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do defaultErrorHandler (InvalidArgs ia) = selectRep $ do provideRep $ defaultLayout $ do setTitle "Invalid Arguments" @@ -397,7 +397,7 @@ index 140600b..75daabc 100644 provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= TE.decodeUtf8With TEE.lenientDecode m] asyncHelper :: (url -> [x] -> Text) -@@ -682,8 +771,4 @@ loadClientSession key getCachedDate sessionName req = load +@@ -653,8 +741,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 @@ -408,7 +408,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 e0d1f0e..cc23fdd 100644 +index ad56452..d3d58ee 100644 --- a/Yesod/Core/Dispatch.hs +++ b/Yesod/Core/Dispatch.hs @@ -1,4 +1,3 @@ @@ -445,7 +445,7 @@ index e0d1f0e..cc23fdd 100644 , PathMultiPiece (..) , Texts -- * Convert to WAI -@@ -135,13 +134,6 @@ toWaiAppLogger logger site = do +@@ -130,13 +129,6 @@ toWaiAppLogger logger site = do , yreSite = site , yreSessionBackend = sb } @@ -459,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 -> +@@ -156,14 +148,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 @@ -470,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 +@@ -197,7 +182,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr -- | Deprecated synonym for 'warp'. warpDebug :: YesodDispatch site => Int -> site -> IO () warpDebug = warp @@ -484,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 2e5d7cb..83f93bf 100644 +index 36f8f5c..948de5f 100644 --- a/Yesod/Core/Handler.hs +++ b/Yesod/Core/Handler.hs -@@ -172,7 +172,7 @@ import Data.Text.Encoding (decodeUtf8With, encodeUtf8) +@@ -171,7 +171,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,7 +496,7 @@ index 2e5d7cb..83f93bf 100644 import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L -@@ -201,6 +201,7 @@ import Control.Exception (throwIO) +@@ -199,6 +199,7 @@ import Control.Exception (throwIO) import Blaze.ByteString.Builder (Builder) import Safe (headMay) import Data.CaseInsensitive (CI) @@ -504,11 +504,11 @@ index 2e5d7cb..83f93bf 100644 import qualified Data.Conduit.List as CL import Control.Monad (unless) import Control.Monad.Trans.Resource (MonadResource, InternalState, runResourceT, withInternalState, getInternalState, liftResourceT, resourceForkIO -@@ -847,19 +848,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) +@@ -803,19 +804,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) -> m a redirectToPost url = do urlText <- toTextUrl url -- giveUrlRenderer [hamlet| +- withUrlRenderer [hamlet| -$newline never -$doctype 5 - @@ -521,7 +521,7 @@ index 2e5d7cb..83f93bf 100644 - <p>Javascript has been disabled; please click on the button below to be redirected. - <input type="submit" value="Continue"> -|] >>= sendResponse -+ giveUrlRenderer $ \ _render_awps ++ withUrlRenderer $ \ _render_awps + -> do { id + ((Text.Blaze.Internal.preEscapedText . T.pack) + "<!DOCTYPE html>\n<html><head><title>Redirecting...</title></head><body onload=\"document.getElementById('form').submit()\"><form id=\"form\" method=\"post\" action=\""); @@ -534,20 +534,18 @@ index 2e5d7cb..83f93bf 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 09b4609..e1ef568 100644 +index fdb2261..12ed4fc 100644 --- a/Yesod/Core/Internal/Run.hs +++ b/Yesod/Core/Internal/Run.hs -@@ -16,8 +16,8 @@ import Control.Exception.Lifted (catch) +@@ -16,7 +16,7 @@ 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, -- liftLoc) +import Control.Monad.Logger (Loc, LogLevel (LevelError), LogSource, -+ ) - import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState) + liftLoc) + import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState) import qualified Data.ByteString as S - import qualified Data.ByteString.Char8 as S8 @@ -31,7 +31,7 @@ import qualified Data.Text as T import Data.Text.Encoding (encodeUtf8) import Data.Text.Encoding (decodeUtf8With) @@ -556,7 +554,7 @@ index 09b4609..e1ef568 100644 +import Language.Haskell.TH.Syntax (qLocation) import qualified Network.HTTP.Types as H import Network.Wai - #if MIN_VERSION_wai(2, 0, 0) + import Network.Wai.Internal @@ -157,8 +157,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) -> ErrorResponse -> YesodApp @@ -686,18 +684,18 @@ index 7e84c1c..a273c29 100644 - ] - return $ LetE [fun] (VarE helper) diff --git a/Yesod/Core/Types.hs b/Yesod/Core/Types.hs -index 7e3fd0d..994d322 100644 +index 4d4474b..61ddb20 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 (..)) -@@ -187,7 +188,7 @@ data RunHandlerEnv site = RunHandlerEnv +@@ -174,7 +175,7 @@ data RunHandlerEnv site = RunHandlerEnv , rheRoute :: !(Maybe (Route site)) , rheSite :: !site , rheUpload :: !(RequestBodyLength -> FileUpload) @@ -767,5 +765,5 @@ index 481199e..8489fbe 100644 ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -- -2.0.0 +1.7.10.4 diff --git a/standalone/no-th/haskell-patches/yesod-form_spliced-TH.patch b/standalone/no-th/haskell-patches/yesod-form_spliced-TH.patch index e29c7de11..9325d1995 100644 --- a/standalone/no-th/haskell-patches/yesod-form_spliced-TH.patch +++ b/standalone/no-th/haskell-patches/yesod-form_spliced-TH.patch @@ -1,3 +1,17 @@ +From 98077d391b930a4c1f69e3b8810409fd261eee34 Mon Sep 17 00:00:00 2001 +From: androidbuilder <androidbuilder@example.com> +Date: Tue, 14 Oct 2014 03:17:38 +0000 +Subject: [PATCH] expand and remove TH + +--- + Yesod/Form/Bootstrap3.hs | 186 +++++++++-- + Yesod/Form/Fields.hs | 797 +++++++++++++++++++++++++++++++++++----------- + Yesod/Form/Functions.hs | 257 ++++++++++++--- + Yesod/Form/Jquery.hs | 134 ++++++-- + Yesod/Form/MassInput.hs | 226 ++++++++++--- + Yesod/Form/Nic.hs | 46 +-- + 6 files changed, 1279 insertions(+), 367 deletions(-) + diff --git a/Yesod/Form/Bootstrap3.hs b/Yesod/Form/Bootstrap3.hs index 84e85fc..1954fb4 100644 --- a/Yesod/Form/Bootstrap3.hs @@ -215,7 +229,7 @@ index 84e85fc..1954fb4 100644 , fvTooltip = Nothing , fvId = bootstrapSubmitId diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs -index 8173e78..8ee847d 100644 +index 8173e78..68a284c 100644 --- a/Yesod/Form/Fields.hs +++ b/Yesod/Form/Fields.hs @@ -1,4 +1,3 @@ @@ -426,10 +440,11 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } where showVal = either id (pack . renderHtml) -@@ -194,9 +262,17 @@ textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m +@@ -193,10 +261,17 @@ instance ToHtml Textarea where + textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Textarea textareaField = Field { fieldParse = parseHelper $ Right . Textarea - , fieldView = \theId name attrs val isReq -> toWidget [hamlet| +- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| -$newline never -<textarea id="#{theId}" name="#{name}" :isReq:required="" *{attrs}>#{either id unTextarea val} -|] @@ -447,7 +462,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -204,10 +280,19 @@ hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage) +@@ -204,10 +279,19 @@ hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage) => Field m p hiddenField = Field { fieldParse = parseHelper $ maybe (Left MsgValueRequired) Right . fromPathPiece @@ -471,7 +486,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -215,20 +300,53 @@ textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Tex +@@ -215,20 +299,53 @@ textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Tex textField = Field { fieldParse = parseHelper $ Right , fieldView = \theId name attrs val isReq -> @@ -533,7 +548,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -300,10 +418,24 @@ emailField = Field +@@ -300,10 +417,24 @@ emailField = Field case Email.canonicalizeEmail $ encodeUtf8 s of Just e -> Right $ decodeUtf8With lenientDecode e Nothing -> Left $ MsgInvalidEmail s @@ -562,7 +577,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -318,10 +450,25 @@ multiEmailField = Field +@@ -318,10 +449,25 @@ multiEmailField = Field in case partitionEithers addrs of ([], good) -> Right good (bad, _) -> Left $ MsgInvalidEmail $ cat bad @@ -592,7 +607,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } where -@@ -337,20 +484,75 @@ searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus +@@ -337,20 +483,75 @@ searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus searchField autoFocus = Field { fieldParse = parseHelper Right , fieldView = \theId name attrs val isReq -> do @@ -680,7 +695,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -361,7 +563,28 @@ urlField = Field +@@ -361,7 +562,28 @@ urlField = Field Nothing -> Left $ MsgInvalidUrl s Just _ -> Right s , fieldView = \theId name attrs val isReq -> @@ -710,7 +725,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -374,18 +597,54 @@ selectField :: (Eq a, RenderMessage site FormMessage) +@@ -374,18 +596,54 @@ selectField :: (Eq a, RenderMessage site FormMessage) => HandlerT site IO (OptionList a) -> Field (HandlerT site IO) a selectField = selectFieldHelper @@ -777,7 +792,7 @@ index 8173e78..8ee847d 100644 multiSelectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -@@ -408,11 +667,45 @@ multiSelectField ioptlist = +@@ -408,11 +666,45 @@ multiSelectField ioptlist = view theId name attrs val isReq = do opts <- fmap olOptions $ handlerToWidget ioptlist let selOpts = map (id &&& (optselected val)) opts @@ -828,7 +843,7 @@ index 8173e78..8ee847d 100644 where optselected (Left _) _ = False optselected (Right vals) opt = (optionInternalValue opt) `elem` vals -@@ -435,54 +728,196 @@ checkboxesField ioptlist = (multiSelectField ioptlist) +@@ -435,54 +727,196 @@ checkboxesField ioptlist = (multiSelectField ioptlist) opts <- fmap olOptions $ handlerToWidget ioptlist let optselected (Left _) _ = False optselected (Right vals) opt = (optionInternalValue opt) `elem` vals @@ -976,9 +991,6 @@ index 8173e78..8ee847d 100644 - <input id=#{theId}-none *{attrs} type=radio name=#{name} value=none checked> - <label for=#{theId}-none>_{MsgSelectNone} - -- --<input id=#{theId}-yes *{attrs} type=radio name=#{name} value=yes :showVal id val:checked> --<label for=#{theId}-yes>_{MsgBoolYes} + , fieldView = \theId name attrs val isReq -> do { condH + [(not isReq, + do { (asWidgetT . toWidget) @@ -1056,13 +1068,16 @@ index 8173e78..8ee847d 100644 + (asWidgetT . toWidget) + ((Text.Blaze.Internal.preEscapedText . pack) "</label>") } +-<input id=#{theId}-yes *{attrs} type=radio name=#{name} value=yes :showVal id val:checked> +-<label for=#{theId}-yes>_{MsgBoolYes} +- -<input id=#{theId}-no *{attrs} type=radio name=#{name} value=no :showVal not val:checked> -<label for=#{theId}-no>_{MsgBoolNo} -|] , fieldEnctype = UrlEncoded } where -@@ -508,10 +943,24 @@ $newline never +@@ -508,10 +942,24 @@ $newline never checkBoxField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool checkBoxField = Field { fieldParse = \e _ -> return $ checkBoxParser e @@ -1091,7 +1106,59 @@ index 8173e78..8ee847d 100644 , fieldEnctype = UrlEncoded } -@@ -642,9 +1091,21 @@ fileField = Field +@@ -555,51 +1003,6 @@ optionsPairs opts = do + optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a) + optionsEnum = optionsPairs $ map (\x -> (pack $ show x, x)) [minBound..maxBound] + +-optionsPersist :: ( YesodPersist site, PersistEntity a +- , PersistQuery (PersistEntityBackend a) +- , PathPiece (Key a) +- , RenderMessage site msg +- , YesodPersistBackend site ~ PersistEntityBackend a +- ) +- => [Filter a] +- -> [SelectOpt a] +- -> (a -> msg) +- -> HandlerT site IO (OptionList (Entity a)) +-optionsPersist filts ords toDisplay = fmap mkOptionList $ do +- mr <- getMessageRender +- pairs <- runDB $ selectList filts ords +- return $ map (\(Entity key value) -> Option +- { optionDisplay = mr (toDisplay value) +- , optionInternalValue = Entity key value +- , optionExternalValue = toPathPiece key +- }) pairs +- +--- | An alternative to 'optionsPersist' which returns just the @Key@ instead of +--- the entire @Entity@. +--- +--- Since 1.3.2 +-optionsPersistKey +- :: (YesodPersist site +- , PersistEntity a +- , PersistQuery (PersistEntityBackend a) +- , PathPiece (Key a) +- , RenderMessage site msg +- , YesodPersistBackend site ~ PersistEntityBackend a +- ) +- => [Filter a] +- -> [SelectOpt a] +- -> (a -> msg) +- -> HandlerT site IO (OptionList (Key a)) +- +-optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do +- mr <- getMessageRender +- pairs <- runDB $ selectList filts ords +- return $ map (\(Entity key value) -> Option +- { optionDisplay = mr (toDisplay value) +- , optionInternalValue = key +- , optionExternalValue = toPathPiece key +- }) pairs +- + selectFieldHelper + :: (Eq a, RenderMessage site FormMessage) + => (Text -> Text -> [(Text, Text)] -> WidgetT site IO () -> WidgetT site IO ()) +@@ -642,9 +1045,21 @@ fileField = Field case files of [] -> Right Nothing file:_ -> Right $ Just file @@ -1116,7 +1183,7 @@ index 8173e78..8ee847d 100644 , fieldEnctype = Multipart } -@@ -671,10 +1132,19 @@ fileAFormReq fs = AForm $ \(site, langs) menvs ints -> do +@@ -671,10 +1086,19 @@ fileAFormReq fs = AForm $ \(site, langs) menvs ints -> do { fvLabel = toHtml $ renderMessage site langs $ fsLabel fs , fvTooltip = fmap (toHtml . renderMessage site langs) $ fsTooltip fs , fvId = id' @@ -1140,7 +1207,7 @@ index 8173e78..8ee847d 100644 , fvErrors = errs , fvRequired = True } -@@ -703,10 +1173,19 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do +@@ -703,10 +1127,19 @@ fileAFormOpt fs = AForm $ \(master, langs) menvs ints -> do { fvLabel = toHtml $ renderMessage master langs $ fsLabel fs , fvTooltip = fmap (toHtml . renderMessage master langs) $ fsTooltip fs , fvId = id' @@ -1969,3 +2036,6 @@ index 2862678..7a0f25a 100644 -addScript' f = do - y <- getYesod - addScriptEither $ f y +-- +1.7.10.4 + diff --git a/standalone/no-th/haskell-patches/yesod-persistent_do-not-really-build.patch b/standalone/no-th/haskell-patches/yesod-persistent_do-not-really-build.patch index a2210d4c4..f0c4dfaa4 100644 --- a/standalone/no-th/haskell-patches/yesod-persistent_do-not-really-build.patch +++ b/standalone/no-th/haskell-patches/yesod-persistent_do-not-really-build.patch @@ -1,23 +1,23 @@ -From 92a34bc2b09572a58a4e696e0d8a0a61475535f7 Mon Sep 17 00:00:00 2001 +From 85917e8b5da3c67c6ca0791fdad735ffb864ae3b Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Tue, 10 Jun 2014 19:09:56 +0000 -Subject: [PATCH] do not really build +Date: Tue, 14 Oct 2014 02:50:19 +0000 +Subject: [PATCH] not needed --- - yesod-persistent.cabal | 10 ---------- + yesod-persistent.cabal | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/yesod-persistent.cabal b/yesod-persistent.cabal -index b44499b..ef33863 100644 +index 2e5735d..438c76d 100644 --- a/yesod-persistent.cabal +++ b/yesod-persistent.cabal @@ -14,16 +14,6 @@ description: Some helpers for using Persistent from Yesod. library build-depends: base >= 4 && < 5 -- , yesod-core >= 1.2.2 && < 1.3 -- , persistent >= 1.2 && < 1.4 -- , persistent-template >= 1.2 && < 1.4 +- , 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 b44499b..ef33863 100644 test-suite test -- -2.0.0 +1.7.10.4 diff --git a/standalone/no-th/haskell-patches/yesod_hack-TH.patch b/standalone/no-th/haskell-patches/yesod_hack-TH.patch index 001d4a471..b1c5c44b4 100644 --- a/standalone/no-th/haskell-patches/yesod_hack-TH.patch +++ b/standalone/no-th/haskell-patches/yesod_hack-TH.patch @@ -1,13 +1,13 @@ -From da032b804c0a35c2831664e28c9211f4fe712593 Mon Sep 17 00:00:00 2001 +From 1d12efe6c85c57bce44d0cd9389c5538f36f599e Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Tue, 10 Jun 2014 20:39:42 +0000 -Subject: [PATCH] avoid TH +Date: Tue, 14 Oct 2014 03:40:28 +0000 +Subject: [PATCH] hack to build --- - Yesod.hs | 19 ++++++++++++-- - Yesod/Default/Main.hs | 32 +----------------------- - Yesod/Default/Util.hs | 69 ++------------------------------------------------- - 3 files changed, 20 insertions(+), 100 deletions(-) + Yesod.hs | 19 ++++++++++++-- + Yesod/Default/Main.hs | 27 +------------------ + Yesod/Default/Util.hs | 69 ++----------------------------------------------- + 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..41c2df0 100644 +index 44e094e..41c2df0 100644 --- a/Yesod/Default/Main.hs +++ b/Yesod/Default/Main.hs @@ -1,10 +1,8 @@ @@ -64,7 +64,7 @@ index 565ed35..41c2df0 100644 import System.Log.FastLogger (LogStr, toLogStr) import Language.Haskell.TH.Syntax (qLocation) -@@ -55,34 +53,6 @@ defaultMain load getApp = do +@@ -55,29 +53,6 @@ defaultMain load getApp = do type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO () @@ -89,12 +89,7 @@ index 565ed35..41c2df0 100644 - (toLogStr $ "Exception from Warp: " ++ show e) - } 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 @@ -196,5 +191,5 @@ index a10358e..0547424 100644 - else return $ Just ex - else return Nothing -- -2.0.0 +1.7.10.4 |