small cleanup

This commit is contained in:
Simon Michael 2013-05-30 15:17:21 -07:00
parent 6073b56b9e
commit 56a37aabcf

View File

@ -508,7 +508,7 @@ postingp = do
account <- modifiedaccountname account <- modifiedaccountname
let (ptype, account') = (accountNamePostingType account, unbracket account) let (ptype, account') = (accountNamePostingType account, unbracket account)
amount <- spaceandamountormissing amount <- spaceandamountormissing
mBalanceAssertion <- balanceassertion massertion <- balanceassertion
_ <- fixedlotprice _ <- fixedlotprice
many spacenonewline many spacenonewline
ctx <- getState ctx <- getState
@ -517,7 +517,7 @@ postingp = do
-- oh boy -- oh boy
d <- maybe (return Nothing) (either (fail.show) (return.Just)) (parseWithCtx ctx date `fmap` dateValueFromTags tags) d <- maybe (return Nothing) (either (fail.show) (return.Just)) (parseWithCtx ctx date `fmap` dateValueFromTags tags)
d2 <- maybe (return Nothing) (either (fail.show) (return.Just)) (parseWithCtx ctx date `fmap` date2ValueFromTags tags) d2 <- maybe (return Nothing) (either (fail.show) (return.Just)) (parseWithCtx ctx date `fmap` date2ValueFromTags tags)
return posting{pdate=d, pdate2=d2, pstatus=status, paccount=account', pamount=amount, pcomment=comment, ptype=ptype, ptags=tags, pbalanceassertion=mBalanceAssertion} return posting{pdate=d, pdate2=d2, pstatus=status, paccount=account', pamount=amount, pcomment=comment, ptype=ptype, ptags=tags, pbalanceassertion=massertion}
#ifdef TESTS #ifdef TESTS
test_postingp = do test_postingp = do