docs: comments

This commit is contained in:
Simon Michael 2010-09-22 21:51:25 +00:00
parent 63531f8adc
commit 96036e56a0
3 changed files with 9 additions and 6 deletions

View File

@ -127,10 +127,10 @@ data Journal = Journal {
jtxns :: [Transaction],
open_timelog_entries :: [TimeLogEntry],
historical_prices :: [HistoricalPrice],
final_comment_lines :: String,
filepath :: FilePath,
filereadtime :: ClockTime,
jtext :: String
final_comment_lines :: String, -- ^ any trailing comments from the journal file
filepath :: FilePath, -- ^ file path of this journal
filereadtime :: ClockTime, -- ^ when this journal was read from its file
jtext :: String -- ^ the raw text read from the journal's file
} deriving (Eq, Typeable)
data Ledger = Ledger {

View File

@ -68,6 +68,8 @@ popParentAccount = do ctx0 <- getState
getParentAccount :: GenParser tok JournalContext String
getParentAccount = liftM (concat . reverse . ctxAccount) getState
-- | Convert a possibly relative, possibly tilde-containing file path to an absolute one.
-- using the current directory from a parsec source position. ~username is not supported.
expandPath :: (MonadIO m) => SourcePos -> FilePath -> m FilePath
expandPath pos fp = liftM mkAbsolute (expandHome fp)
where

View File

@ -87,8 +87,9 @@ staticdir = datadir ++ "/static"
templatesdir :: FilePath
templatesdir = datadir ++ "/templates"
-- The following are compile-time macros. In production mode, the template
-- is read only once at startup, otherwise every time.
-- The following are compile-time macros. If the file paths they point to
-- don't exist, they will give an error (at compile time). In production
-- mode, files are read once at compile time, otherwise repeatedly at runtime.
hamletFile :: FilePath -> Q Exp
#ifdef PRODUCTION