diff --git a/hledger-web/Hledger/Web/Foundation.hs b/hledger-web/Hledger/Web/App.hs similarity index 98% rename from hledger-web/Hledger/Web/Foundation.hs rename to hledger-web/Hledger/Web/App.hs index 217e8a1be..6fbfc2d43 100644 --- a/hledger-web/Hledger/Web/Foundation.hs +++ b/hledger-web/Hledger/Web/App.hs @@ -10,10 +10,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} --- | Define the web application's foundation, in the usual Yesod style. --- See a default Yesod app's comments for more details of each part. - -module Hledger.Web.Foundation where +module Hledger.Web.App where import Control.Applicative ((<|>)) import Control.Monad (join, when, unless) diff --git a/hledger-web/Hledger/Web/Application.hs b/hledger-web/Hledger/Web/Application.hs index 4ba2c3424..e2abbb0b7 100644 --- a/hledger-web/Hledger/Web/Application.hs +++ b/hledger-web/Hledger/Web/Application.hs @@ -26,9 +26,9 @@ import Hledger.Web.Handler.RegisterR import Hledger.Web.Import import Hledger.Web.WebOptions (WebOpts(serve_,serve_api_), corsPolicy) --- This line actually creates our YesodDispatch instance. It is the second half --- of the call to mkYesodData which occurs in Foundation.hs. Please see the --- comments there for more details. +-- mkYesodDispatch creates our YesodDispatch instance. +-- It complements the mkYesodData call in App.hs, +-- but must be in a separate file for (TH?) reasons. mkYesodDispatch "App" resourcesApp -- This function allocates resources (such as a database connection pool), diff --git a/hledger-web/Hledger/Web/Import.hs b/hledger-web/Hledger/Web/Import.hs index cadbfe77f..34d42ce77 100644 --- a/hledger-web/Hledger/Web/Import.hs +++ b/hledger-web/Hledger/Web/Import.hs @@ -20,7 +20,7 @@ import Data.Traversable as Import import Data.Void as Import (Void) import Text.Blaze as Import (Markup) -import Hledger.Web.Foundation as Import +import Hledger.Web.App as Import import Hledger.Web.Settings as Import import Hledger.Web.Settings.StaticFiles as Import import Hledger.Web.WebOptions as Import (Permission(..)) diff --git a/hledger-web/Hledger/Web/Settings.hs b/hledger-web/Hledger/Web/Settings.hs index 44c418b0a..9e5d7774b 100644 --- a/hledger-web/Hledger/Web/Settings.hs +++ b/hledger-web/Hledger/Web/Settings.hs @@ -67,10 +67,10 @@ staticDir = "static" -- files, more easily set expires and cache values, and avoid possibly -- costly transference of cookies on static files. -- --- If you change the resource pattern for StaticR in Foundation.hs, +-- If you change the resource pattern for StaticR in App.hs, -- (or staticDir above), you will have to make a corresponding change here. -- --- To see how this value is used, see urlRenderOverride in Foundation.hs +-- To see how this value is used, see urlRenderOverride in App.hs -- -- XXX Does not respect --file-url #2139 staticRoot :: AppConfig DefaultEnv Extra -> Text diff --git a/hledger-web/Hledger/Web/Widget/AddForm.hs b/hledger-web/Hledger/Web/Widget/AddForm.hs index 0db4d35d7..d67bf3b7b 100644 --- a/hledger-web/Hledger/Web/Widget/AddForm.hs +++ b/hledger-web/Hledger/Web/Widget/AddForm.hs @@ -25,7 +25,7 @@ import Text.Megaparsec (bundleErrors, eof, parseErrorTextPretty, runParser) import Yesod import Hledger -import Hledger.Web.Foundation (App, Handler, Widget) +import Hledger.Web.App (App, Handler, Widget) import Hledger.Web.Settings (widgetFile) import Data.Function ((&)) import Control.Arrow (right)