diff options
Diffstat (limited to 'Foundation.hs')
-rw-r--r-- | Foundation.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Foundation.hs b/Foundation.hs index 49acd52..4ce89c8 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -29,9 +29,18 @@ import Web.ClientSession (getKey) import Text.Hamlet (hamletFile) import qualified Data.Text import Data.Map (Map) +import Hledger.JournalCSVs (JReportType(..)) type Ledger = Data.Text.Text +instance PathPiece JReportType where + fromPathPiece "pandl" = Just PandL + fromPathPiece "assets" = Just Assets + fromPathPiece "liabilities" = Just Liabilities + fromPathPiece "everything" = Just Everything + fromPathPiece _ = Nothing + toPathPiece = Data.Text.toLower . Data.Text.pack . show + -- | 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 |