Use reportMessage function.

This commit is contained in:
Kei Hibino 2014-10-10 20:06:45 +09:00
parent bac62457a7
commit 98860b4bff
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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