dev:web: rename Hledger.Web.Foundation to Hledger.Web.App
This commit is contained in:
parent
0396725e71
commit
8e0370bd58
@ -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)
|
||||
@ -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),
|
||||
|
||||
@ -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(..))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user