mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-29 14:45:51 +03:00
Use reportMessage function.
This commit is contained in:
parent
bac62457a7
commit
98860b4bff
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user