From 98860b4bff2bbe32bfc7a8af093c45e93228c5cd Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Fri, 10 Oct 2014 20:06:45 +0900 Subject: [PATCH] Use reportMessage function. --- relational-query-HDBC/src/Database/HDBC/Schema/IBMDB2.hs | 4 +++- relational-query-HDBC/src/Database/HDBC/Schema/PostgreSQL.hs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/relational-query-HDBC/src/Database/HDBC/Schema/IBMDB2.hs b/relational-query-HDBC/src/Database/HDBC/Schema/IBMDB2.hs index c9efc18b..a27b409a 100644 --- a/relational-query-HDBC/src/Database/HDBC/Schema/IBMDB2.hs +++ b/relational-query-HDBC/src/Database/HDBC/Schema/IBMDB2.hs @@ -28,6 +28,8 @@ import Control.Monad (when) import Database.HDBC (IConnection, SqlValue) +import Language.Haskell.TH.Lib.Extra (reportMessage) + import Database.HDBC.Record.Query (runQuery') import Database.HDBC.Record.Persistable () @@ -50,7 +52,7 @@ logPrefix :: String -> String logPrefix = ("IBMDB2: " ++) putLog :: String -> IO () -putLog = putStrLn . logPrefix +putLog = reportMessage . logPrefix compileErrorIO :: String -> IO a compileErrorIO = fail . logPrefix diff --git a/relational-query-HDBC/src/Database/HDBC/Schema/PostgreSQL.hs b/relational-query-HDBC/src/Database/HDBC/Schema/PostgreSQL.hs index 0a4be8d8..aa24d145 100644 --- a/relational-query-HDBC/src/Database/HDBC/Schema/PostgreSQL.hs +++ b/relational-query-HDBC/src/Database/HDBC/Schema/PostgreSQL.hs @@ -25,6 +25,8 @@ import Control.Monad (when) import Database.HDBC (IConnection, SqlValue) +import Language.Haskell.TH.Lib.Extra (reportMessage) + import Database.HDBC.Record.Query (runQuery') import Database.HDBC.Record.Persistable () @@ -51,7 +53,7 @@ logPrefix :: String -> String logPrefix = ("PostgreSQL: " ++) putLog :: String -> IO () -putLog = putStrLn . logPrefix +putLog = reportMessage . logPrefix compileErrorIO :: String -> IO a compileErrorIO = fail . logPrefix