summaryrefslogtreecommitdiff
path: root/Application.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Application.hs')
-rw-r--r--Application.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Application.hs b/Application.hs
index a0e9257..b0fb61e 100644
--- a/Application.hs
+++ b/Application.hs
@@ -12,8 +12,8 @@ import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.RequestLogger
-import qualified Database.Persist.Store
-import Database.Persist.GenericSql (runMigration)
+import qualified Database.Persist
+import Database.Persist.Sql (runMigration)
import Network.HTTP.Conduit (newManager, def)
import Control.Monad.Logger (runLoggingT)
import System.IO (stdout)
@@ -60,15 +60,15 @@ makeFoundation conf = do
manager <- newManager def
s <- staticSite
dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf)
- Database.Persist.Store.loadConfig >>=
- Database.Persist.Store.applyEnv
- p <- Database.Persist.Store.createPoolConfig (dbconf :: Settings.PersistConfig)
+ Database.Persist.loadConfig >>=
+ Database.Persist.applyEnv
+ p <- Database.Persist.createPoolConfig (dbconf :: Settings.PersistConf)
logger <- mkLogger True stdout
let foundation = App conf s p manager dbconf logger
-- Perform database migration using our application's logging settings.
runLoggingT
- (Database.Persist.Store.runPool dbconf (runMigration migrateAll) p)
+ (Database.Persist.runPool dbconf (runMigration migrateAll) p)
(messageLoggerSource foundation logger)
return foundation
@@ -78,6 +78,6 @@ getApplicationDev :: IO (Int, Application)
getApplicationDev =
defaultDevelApp loader makeApplication
where
- loader = loadConfig (configSettings Development)
+ loader = Yesod.Default.Config.loadConfig (configSettings Development)
{ csParseExtra = parseExtra
}