diff --git a/Ledger/Amount.hs b/Ledger/Amount.hs index 972c72842..fafca78e9 100644 --- a/Ledger/Amount.hs +++ b/Ledger/Amount.hs @@ -141,6 +141,6 @@ nullamt :: MixedAmount nullamt = Mixed [] -- | A temporary value for parsed transactions which had no amount specified. -autoamt :: MixedAmount -autoamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0] +missingamt :: MixedAmount +missingamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0] diff --git a/Ledger/Parse.hs b/Ledger/Parse.hs index 89d7db77b..948f547a1 100644 --- a/Ledger/Parse.hs +++ b/Ledger/Parse.hs @@ -305,9 +305,9 @@ transactionamount :: Parser MixedAmount transactionamount = try (do many1 spacenonewline - a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return autoamt + a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return missingamt return a - ) <|> return autoamt + ) <|> return missingamt leftsymbolamount :: Parser MixedAmount leftsymbolamount = do diff --git a/Ledger/RawTransaction.hs b/Ledger/RawTransaction.hs index 5482a8348..bf7d7e7a5 100644 --- a/Ledger/RawTransaction.hs +++ b/Ledger/RawTransaction.hs @@ -30,4 +30,4 @@ isReal :: RawTransaction -> Bool isReal t = rttype t == RegularTransaction hasAmount :: RawTransaction -> Bool -hasAmount = (/= autoamt) . tamount +hasAmount = (/= missingamt) . tamount