-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Web interface for the hledger accounting tool
--   
--   This is hledger's web interface. It provides a more user-friendly and
--   collaborative UI than the command-line or curses-style interfaces.
--   
--   hledger is a cross-platform program for tracking money, time, or any
--   other commodity, using double-entry accounting and a simple, editable
--   file format. It is inspired by and largely compatible with ledger(1).
--   hledger provides command-line, curses and web interfaces, and aims to
--   be a reliable, practical tool for daily use.
@package hledger-web
@version 1.3

module Settings.Development
development :: Bool
production :: Bool


-- | Settings are centralized, as much as possible, into this file. This
--   includes database connection settings, static file locations, etc. In
--   addition, you can configure a number of different aspects of Yesod by
--   overriding methods in the Yesod typeclass. That instance is declared
--   in the Foundation.hs file.
module Settings
hledgerorgurl :: String
manualurl :: String

-- | The default IP address to listen on. May be overridden with --host.
defhost :: String

-- | The default TCP port to listen on. May be overridden with --port.
defport :: Int
defbaseurl :: String -> Int -> String

-- | The location of static files on your system. This is a file system
--   path. The default value works properly with your scaffolded site.
staticDir :: FilePath

-- | The base URL for your static files. As you can see by the default
--   value, this can simply be "static" appended to your application root.
--   A powerful optimization can be serving static files from a separate
--   domain name. This allows you to use a web server optimized for static
--   files, more easily set expires and cache values, and avoid possibly
--   costly transference of cookies on static files. For more information,
--   please see:
--   <a>http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain</a>
--   
--   If you change the resource pattern for StaticR in Foundation.hs, you
--   will have to make a corresponding change here.
--   
--   To see how this value is used, see urlRenderOverride in Foundation.hs
staticRoot :: AppConfig DefaultEnv Extra -> Text

-- | Settings for <a>widgetFile</a>, such as which template languages to
--   support and default Hamlet settings.
widgetFileSettings :: WidgetFileSettings
widgetFile :: String -> Q Exp
data Extra
Extra :: Text -> Maybe Text -> Maybe Text -> Extra
[extraCopyright] :: Extra -> Text

-- | Google Analytics
[extraAnalytics] :: Extra -> Maybe Text
[extraStaticRoot] :: Extra -> Maybe Text
parseExtra :: DefaultEnv -> Object -> Parser Extra
instance GHC.Show.Show Settings.Extra

module Settings.StaticFiles
staticSite :: IO Static
fonts_glyphicons_halflings_regular_ttf :: StaticRoute
fonts_glyphicons_halflings_regular_woff :: StaticRoute
fonts_glyphicons_halflings_regular_eot :: StaticRoute
fonts_glyphicons_halflings_regular_svg :: StaticRoute
js_jquery_flot_errorbars_js :: StaticRoute
js_jquery_flot_resize_js :: StaticRoute
js_jquery_flot_time_min_js :: StaticRoute
js_typeahead_bundle_js :: StaticRoute
js_jquery_flot_image_min_js :: StaticRoute
js_jquery_flot_tooltip_min_js :: StaticRoute
js_jquery_flot_threshold_min_js :: StaticRoute
js_jquery_flot_fillbetween_js :: StaticRoute
js_jquery_flot_navigate_min_js :: StaticRoute
js_jquery_url_js :: StaticRoute
js_excanvas_js :: StaticRoute
js_jquery_flot_crosshair_min_js :: StaticRoute
js_jquery_flot_tooltip_js :: StaticRoute
js_jquery_flot_symbol_js :: StaticRoute
js_jquery_flot_errorbars_min_js :: StaticRoute
js_jquery_flot_canvas_js :: StaticRoute
js_jquery_flot_stack_js :: StaticRoute
js_jquery_flot_pie_min_js :: StaticRoute
js_typeahead_bundle_min_js :: StaticRoute
js_jquery_flot_image_js :: StaticRoute
js_jquery_min_js :: StaticRoute
js_jquery_flot_min_js :: StaticRoute
js_jquery_cookie_js :: StaticRoute
js_jquery_flot_categories_js :: StaticRoute
js_jquery_js :: StaticRoute
js_jquery_flot_threshold_js :: StaticRoute
js_jquery_flot_time_js :: StaticRoute
js_jquery_flot_crosshair_js :: StaticRoute
js_jquery_flot_selection_min_js :: StaticRoute
js_jquery_hotkeys_js :: StaticRoute
js_jquery_flot_resize_min_js :: StaticRoute
js_jquery_flot_pie_js :: StaticRoute
js_jquery_flot_canvas_min_js :: StaticRoute
js_jquery_flot_selection_js :: StaticRoute
js_jquery_flot_categories_min_js :: StaticRoute
js_jquery_flot_fillbetween_min_js :: StaticRoute
js_bootstrap_min_js :: StaticRoute
js_jquery_flot_js :: StaticRoute
js_jquery_flot_symbol_min_js :: StaticRoute
js_bootstrap_js :: StaticRoute
js_excanvas_min_js :: StaticRoute
js_jquery_flot_navigate_js :: StaticRoute
js_jquery_flot_stack_min_js :: StaticRoute
css_bootstrap_theme_min_css :: StaticRoute
css_bootstrap_theme_css_map :: StaticRoute
css_bootstrap_css_map :: StaticRoute
css_bootstrap_css :: StaticRoute
css_bootstrap_theme_css :: StaticRoute
css_bootstrap_min_css :: StaticRoute
hledger_css :: StaticRoute
hledger_js :: StaticRoute

module Hledger.Web.WebOptions
progname :: String
version :: String
prognameandversion :: String
webflags :: [Flag [([Char], [Char])]]
webmode :: Mode [([Char], [Char])]
data WebOpts
WebOpts :: Bool -> String -> Int -> String -> Maybe String -> CliOpts -> WebOpts
[serve_] :: WebOpts -> Bool
[host_] :: WebOpts -> String
[port_] :: WebOpts -> Int
[base_url_] :: WebOpts -> String
[file_url_] :: WebOpts -> Maybe String
[cliopts_] :: WebOpts -> CliOpts
defwebopts :: WebOpts
rawOptsToWebOpts :: RawOpts -> IO WebOpts
checkWebOpts :: WebOpts -> WebOpts
getHledgerWebOpts :: IO WebOpts
instance GHC.Show.Show Hledger.Web.WebOptions.WebOpts


-- | Web handler utilities. More of these are in Foundation.hs, where they
--   can be used in the default template.
module Handler.Utils
numbered :: [a] -> [(Int, a)]
dayToJsTimestamp :: Day -> Integer

module Foundation

-- | 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.
data App
App :: AppConfig DefaultEnv Extra -> Static -> Manager -> WebOpts -> IORef Journal -> App
[settings] :: App -> AppConfig DefaultEnv Extra

-- | Settings for static file serving.
[getStatic] :: App -> Static
[httpManager] :: App -> Manager
[appOpts] :: App -> WebOpts
[appJournal] :: App -> IORef Journal
data AppMessage
MsgHello :: AppMessage
type Handler = HandlerT App IO
type Widget = WidgetT App IO ()
resourcesApp :: [ResourceTree String]

-- | A convenience alias.
type AppRoute = Route App
type Form x = Html -> MForm (HandlerT App IO) (FormResult x, Widget)

-- | Get the <a>Extra</a> value, used to hold data from the settings.yml
--   file.
getExtra :: Handler Extra

-- | A bundle of data useful for hledger-web request handlers and
--   templates.
data ViewData
VD :: WebOpts -> AppRoute -> Maybe Html -> Day -> Journal -> String -> Query -> [QueryOpt] -> Query -> [QueryOpt] -> Bool -> Bool -> ViewData

-- | the command-line options at startup
[opts] :: ViewData -> WebOpts

-- | the current route
[here] :: ViewData -> AppRoute

-- | the current UI message if any, possibly from the current request
[msg] :: ViewData -> Maybe Html

-- | today's date (for queries containing relative dates)
[today] :: ViewData -> Day

-- | the up-to-date parsed unfiltered journal
[j] :: ViewData -> Journal

-- | the current q parameter, the main query expression
[q] :: ViewData -> String

-- | a query parsed from the q parameter
[m] :: ViewData -> Query

-- | query options parsed from the q parameter
[qopts] :: ViewData -> [QueryOpt]

-- | a query parsed from the accounts sidebar query expr ("a" parameter)
[am] :: ViewData -> Query

-- | query options parsed from the accounts sidebar query expr
[aopts] :: ViewData -> [QueryOpt]

-- | current p parameter, 1 or 0 shows/hides all postings where applicable
[showpostings] :: ViewData -> Bool

-- | current showsidebar cookie value
[showsidebar] :: ViewData -> Bool

-- | Make a default ViewData, using day 0 as today's date.
nullviewdata :: ViewData

-- | Make a ViewData using the given date and request parameters, and
--   defaults elsewhere.
viewdataWithDateAndParams :: Day -> String -> String -> String -> ViewData

-- | Gather data used by handlers and templates in the current request.
getViewData :: Handler ViewData

-- | Get the message that was set by the last request, in a referentially
--   transparent manner (allowing multiple reads).
getLastMessage :: Handler (Maybe Html)

-- | Add transaction form.
addform :: Text -> ViewData -> HtmlUrl AppRoute
journalselect :: [FilePath] -> HtmlUrl AppRoute
journalradio :: [FilePath] -> HtmlUrl AppRoute
instance GHC.Show.Show Foundation.ViewData
instance GHC.Read.Read (Yesod.Routes.Class.Route Foundation.App)
instance GHC.Classes.Eq (Yesod.Routes.Class.Route Foundation.App)
instance GHC.Show.Show (Yesod.Routes.Class.Route Foundation.App)
instance Yesod.Routes.Class.ParseRoute Foundation.App
instance Yesod.Routes.Class.RenderRoute Foundation.App
instance Yesod.Routes.Class.RouteAttrs Foundation.App
instance Yesod.Core.Class.Yesod.Yesod Foundation.App
instance Text.Shakespeare.I18N.RenderMessage Foundation.App Yesod.Form.Types.FormMessage
instance GHC.Show.Show Text.Blaze.Internal.Markup
instance Text.Shakespeare.I18N.RenderMessage Foundation.App Foundation.AppMessage

module Import


-- | Add form data &amp; handler. (The layout and js are defined in
--   Foundation so that the add form can be in the default layout for all
--   views.)
module Handler.AddForm
data AddForm
AddForm :: Day -> Maybe Text -> Maybe Text -> AddForm
[addFormDate] :: AddForm -> Day
[addFormDescription] :: AddForm -> Maybe Text
[addFormJournalFile] :: AddForm -> Maybe Text
postAddForm :: Handler Html
instance GHC.Show.Show Handler.AddForm.AddForm


-- | Common page components and rendering helpers. For global page layout,
--   see Application.hs.
module Handler.Common

-- | Standard hledger-web page layout.
hledgerLayout :: ViewData -> String -> HtmlUrl AppRoute -> HandlerT App IO Html

-- | Global toolbar/heading area.
topbar :: ViewData -> HtmlUrl AppRoute

-- | The sidebar used on most views.
sidebar :: ViewData -> HtmlUrl AppRoute

-- | ] where u' = (dest, if null q then [] else [("q", pack q)]) style |
--   dest == here = "navlinkcurrent" | otherwise = "navlink" :: Text
--   
--   ]
--   
--   Search form for entering custom queries to filter journal data.
searchform :: ViewData -> HtmlUrl AppRoute

-- | ] where title = "Edit journal" :: String manyfiles = length (files j)
--   &gt; 1 formathelp = helplink "file-format" "file format help"
--   
--   ]
--   
--   Link to a topic in the manual.
helplink :: String -> String -> HtmlUrl AppRoute
nulltemplate :: HtmlUrl AppRoute

-- | Render a <a>BalanceReport</a> as html.
balanceReportAsHtml :: WebOpts -> ViewData -> BalanceReport -> HtmlUrl AppRoute
accountQuery :: AccountName -> String
accountOnlyQuery :: AccountName -> String
accountUrl :: AppRoute -> AccountName -> (AppRoute, [(Text, Text)])
numberTransactionsReportItems :: [TransactionsReportItem] -> [(Int, Bool, Bool, Bool, TransactionsReportItem)]
mixedAmountAsHtml :: MixedAmount -> Html


-- | /journal handlers.
module Handler.JournalR

-- | The formatted journal view, with sidebar.
getJournalR :: Handler Html
postJournalR :: Handler Html

-- | Render a <a>TransactionsReport</a> as html for the formatted journal
--   view.
journalTransactionsReportAsHtml :: WebOpts -> ViewData -> TransactionsReport -> HtmlUrl AppRoute


-- | /register handlers.
module Handler.RegisterR

-- | The main journal/account register view, with accounts sidebar.
getRegisterR :: Handler Html
postRegisterR :: Handler Html
registerReportHtml :: WebOpts -> ViewData -> TransactionsReport -> HtmlUrl AppRoute
registerItemsHtml :: WebOpts -> ViewData -> TransactionsReport -> HtmlUrl AppRoute

-- | Generate javascript/html for a register balance line chart based on
--   the provided <a>TransactionsReportItem</a>s. registerChartHtml ::
--   forall t (t1 :: * -&gt; *) t2 t3 t4 t5. Data.Foldable.Foldable t1
--   =&gt; t1 (Transaction, t2, t3, t4, t5, MixedAmount) -&gt; t -&gt;
--   Text.Blaze.Internal.HtmlM ()
registerChartHtml :: [(CommoditySymbol, (String, [TransactionsReportItem]))] -> HtmlUrl AppRoute


-- | Site root and misc. handlers.
module Handler.RootR
getRootR :: Handler Html


-- | /sidebar
module Handler.SidebarR

-- | Render just the accounts sidebar, useful when opening the sidebar.
getSidebarR :: Handler Html

module Application
makeApplication :: WebOpts -> Journal -> AppConfig DefaultEnv Extra -> IO Application
getApplicationDev :: IO (Int, Application)
makeFoundation :: AppConfig DefaultEnv Extra -> WebOpts -> IO App
instance Yesod.Core.Class.Dispatch.YesodDispatch Foundation.App


-- | hledger-web - a hledger add-on providing a web interface. Copyright
--   (c) 2007-2012 Simon Michael <a>simon@joyful.com</a> Released under GPL
--   version 3 or later.
module Hledger.Web.Main
hledgerWebMain :: IO ()
runWith :: WebOpts -> IO ()
withJournalDo' :: WebOpts -> (WebOpts -> Journal -> IO ()) -> IO ()

-- | The web command.
web :: WebOpts -> Journal -> IO ()


-- | Re-export the modules of the hledger-web program.
module Hledger.Web
tests_Hledger_Web :: Test
