summaryrefslogtreecommitdiff
path: root/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch')
-rw-r--r--standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch b/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch
new file mode 100644
index 000000000..38cecc5c7
--- /dev/null
+++ b/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch
@@ -0,0 +1,71 @@
+From 8fddef803ee9191ca15363283b7e4d5af4c70f3a Mon Sep 17 00:00:00 2001
+From: Joey Hess <joey@kitenet.net>
+Date: Thu, 28 Feb 2013 23:34:10 -0400
+Subject: [PATCH] disable TH
+
+---
+ Database/Persist/GenericSql/Internal.hs | 6 +-----
+ Database/Persist/GenericSql/Raw.hs | 5 ++---
+ 2 files changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/Database/Persist/GenericSql/Internal.hs b/Database/Persist/GenericSql/Internal.hs
+index f109887..5273398 100644
+--- a/Database/Persist/GenericSql/Internal.hs
++++ b/Database/Persist/GenericSql/Internal.hs
+@@ -14,7 +14,6 @@ module Database.Persist.GenericSql.Internal
+ , createSqlPool
+ , mkColumns
+ , Column (..)
+- , logSQL
+ , InsertSqlResult (..)
+ ) where
+
+@@ -33,7 +32,7 @@ import Data.Monoid (Monoid, mappend, mconcat)
+ import Database.Persist.EntityDef
+ import qualified Data.Conduit as C
+ import Language.Haskell.TH.Syntax (Q, Exp)
+-import Control.Monad.Logger (logDebugS)
++
+ import Data.Maybe (mapMaybe, listToMaybe)
+ import Data.Int (Int64)
+
+@@ -197,6 +196,3 @@ tableColumn t s = go $ entityColumns t
+ | x == s = ColumnDef x y z
+ | otherwise = go rest
+ -}
+-
+-logSQL :: Q Exp
+-logSQL = [|\sql_foo params_foo -> $logDebugS (T.pack "SQL") $ T.pack $ show (sql_foo :: Text) ++ " " ++ show (params_foo :: [PersistValue])|]
+diff --git a/Database/Persist/GenericSql/Raw.hs b/Database/Persist/GenericSql/Raw.hs
+index e4bf9f4..3da8fa0 100644
+--- a/Database/Persist/GenericSql/Raw.hs
++++ b/Database/Persist/GenericSql/Raw.hs
+@@ -26,7 +26,6 @@ import Database.Persist.GenericSql.Internal hiding (execute, withStmt)
+ import Database.Persist.Store (PersistValue)
+ import Data.IORef
+ import Control.Monad.IO.Class
+-import Control.Monad.Logger (logDebugS)
+ import Control.Monad.Trans.Reader
+ import qualified Data.Map as Map
+ import Control.Applicative (Applicative)
+@@ -134,7 +133,7 @@ withStmt :: (MonadSqlPersist m, MonadResource m)
+ -> [PersistValue]
+ -> Source m [PersistValue]
+ withStmt sql vals = do
+- lift $ $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
++ -- lift $ pack $ show sql ++ " " ++ show vals
+ conn <- lift askSqlConn
+ bracketP
+ (getStmt' conn sql)
+@@ -146,7 +145,7 @@ execute x y = liftM (const ()) $ executeCount x y
+
+ executeCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64
+ executeCount sql vals = do
+- $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
++ -- pack $ show sql ++ " " ++ show vals
+ stmt <- getStmt sql
+ res <- liftIO $ I.execute stmt vals
+ liftIO $ reset stmt
+--
+1.7.10.4
+