From 330dfe689124444515654c70543a4000ff65c061 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 2 Jul 2014 17:41:33 -0700 Subject: [PATCH] commodity & amount style parser cleanups, part 2 --- hledger-lib/Hledger/Data/Journal.hs | 2 +- hledger/Hledger/Cli/Add.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Journal.hs b/hledger-lib/Hledger/Data/Journal.hs index 1fff15afa..5333f23c9 100644 --- a/hledger-lib/Hledger/Data/Journal.hs +++ b/hledger-lib/Hledger/Data/Journal.hs @@ -133,7 +133,7 @@ nulljournal = Journal { jmodifiertxns = [] } nullctx :: JournalContext -nullctx = Ctx { ctxYear = Nothing, ctxCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] } +nullctx = Ctx { ctxYear = Nothing, ctxDefaultCommodityAndStyle = Nothing, ctxAccount = [], ctxAliases = [] } journalFilePath :: Journal -> FilePath journalFilePath = fst . mainfile diff --git a/hledger/Hledger/Cli/Add.hs b/hledger/Hledger/Cli/Add.hs index 40073fe33..dc61a14ed 100644 --- a/hledger/Hledger/Cli/Add.hs +++ b/hledger/Hledger/Cli/Add.hs @@ -266,7 +266,7 @@ amountAndCommentWizard EntryState{..} = do line $ green $ printf "Amount %d%s: " pnum (showDefault def) where parseAmountAndComment = either (const Nothing) Just . parseWithCtx nodefcommodityctx amountandcommentp - nodefcommodityctx = (jContext esJournal){ctxCommodityAndStyle=Nothing} + nodefcommodityctx = (jContext esJournal){ctxDefaultCommodityAndStyle=Nothing} amountandcommentp = do a <- amountp many spacenonewline