diff --git a/hledger-web/Hledger/Web/Application.hs b/hledger-web/Hledger/Web/Application.hs index 2bb4ab173..47ce7713d 100644 --- a/hledger-web/Hledger/Web/Application.hs +++ b/hledger-web/Hledger/Web/Application.hs @@ -12,6 +12,7 @@ where import Data.Dynamic (Dynamic, toDyn) import Network.Wai (Application) import Network.Wai.Middleware.Debug (debugHandle) +import Yesod.Core hiding (AppConfig,loadConfig,appPort) import Yesod.Logger (makeLogger, flushLogger, Logger, logLazyText, logString) import Yesod.Static @@ -33,10 +34,10 @@ withApp :: AppConfig -> Logger -> WebOpts -> (Application -> IO a) -> IO a withApp conf logger opts f = do #ifdef PRODUCTION putStrLn $ "Production mode, using embedded web files" - let s = $(embed Hledger.Web.Settings.staticDir) + let s = $(embed staticDir) #else - putStrLn $ "Not in production mode, using web files from " ++ Hledger.Web.Settings.staticDir ++ "/" - s <- staticDevel Hledger.Web.Settings.staticDir + putStrLn $ "Not in production mode, using web files from " ++ staticDir ++ "/" + s <- staticDevel staticDir #endif let a = App {settings=conf ,getLogger=logger @@ -52,7 +53,7 @@ withDevelAppPort = where go :: ((Int, Application) -> IO ()) -> IO () go f = do - conf <- Hledger.Web.Settings.loadConfig Hledger.Web.Settings.Development + conf <- loadConfig Development let port = appPort conf logger <- makeLogger logString logger $ "Devel application launched with default options, listening on port " ++ show port diff --git a/hledger-web/Hledger/Web/Foundation.hs b/hledger-web/Hledger/Web/Foundation.hs index 58efac0d6..76c615d27 100644 --- a/hledger-web/Hledger/Web/Foundation.hs +++ b/hledger-web/Hledger/Web/Foundation.hs @@ -6,8 +6,6 @@ module Hledger.Web.Foundation , resourcesApp , Handler , Widget - , module Yesod.Core - -- , module Settings , StaticRoute (..) , lift , liftIO diff --git a/hledger-web/Hledger/Web/Handlers.hs b/hledger-web/Hledger/Web/Handlers.hs index 59f1b6ccc..f89e1804d 100644 --- a/hledger-web/Hledger/Web/Handlers.hs +++ b/hledger-web/Hledger/Web/Handlers.hs @@ -23,6 +23,7 @@ import System.Locale (defaultTimeLocale) import Text.Blaze (preEscapedString, toHtml) import Text.Hamlet hiding (hamletFile) import Text.Printf +import Yesod.Core import Yesod.Json import Hledger hiding (today)