hledger-web-1.2: Web interface for the hledger accounting tool

Safe HaskellNone
LanguageHaskell2010

Foundation

Contents

Synopsis

Documentation

data App #

The site argument for your application. This can be a good place to keep settings and values requiring initialization before your application starts running, such as database connections. Every handler will have access to the data present here.

Constructors

App 

Fields

Instances

RouteAttrs App # 

Methods

routeAttrs :: Route App -> Set Text #

ParseRoute App # 

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route App) #

RenderRoute App # 

Associated Types

data Route App :: * #

Methods

renderRoute :: Route App -> ([Text], [(Text, Text)]) #

Yesod App # 
RenderMessage App FormMessage # 

Methods

renderMessage :: App -> [Lang] -> FormMessage -> Text #

RenderMessage App AppMessage # 

Methods

renderMessage :: App -> [Lang] -> AppMessage -> Text #

Eq (Route App) # 

Methods

(==) :: Route App -> Route App -> Bool #

(/=) :: Route App -> Route App -> Bool #

Read (Route App) # 
Show (Route App) # 
data Route App # 

data AppMessage #

Constructors

MsgHello 

Creates the route datatype AppRoute. Every valid URL in your

Creates the associated type:

Creates the value resourcesApp which contains information on the

type AppRoute = Route App #

A convenience alias.

getExtra :: Handler Extra #

Get the Extra value, used to hold data from the settings.yml file.

data ViewData #

A bundle of data useful for hledger-web request handlers and templates.

Constructors

VD 

Fields

  • opts :: WebOpts

    the command-line options at startup

  • here :: AppRoute

    the current route

  • msg :: Maybe Html

    the current UI message if any, possibly from the current request

  • today :: Day

    today's date (for queries containing relative dates)

  • j :: Journal

    the up-to-date parsed unfiltered journal

  • q :: String

    the current q parameter, the main query expression

  • m :: Query

    a query parsed from the q parameter

  • qopts :: [QueryOpt]

    query options parsed from the q parameter

  • am :: Query

    a query parsed from the accounts sidebar query expr ("a" parameter)

  • aopts :: [QueryOpt]

    query options parsed from the accounts sidebar query expr

  • showpostings :: Bool

    current p parameter, 1 or 0 shows/hides all postings where applicable

  • showsidebar :: Bool

    current showsidebar cookie value

Instances

nullviewdata :: ViewData #

Make a default ViewData, using day 0 as today's date.

viewdataWithDateAndParams :: Day -> String -> String -> String -> ViewData #

Make a ViewData using the given date and request parameters, and defaults elsewhere.

getViewData :: Handler ViewData #

Gather data used by handlers and templates in the current request.

getLastMessage :: Handler (Maybe Html) #

Get the message that was set by the last request, in a referentially transparent manner (allowing multiple reads).

addform :: Text -> ViewData -> HtmlUrl AppRoute #

Add transaction form.

Orphan instances