;fix some warnings with GHC 8.10 alpha

hledger is GHC 8.10 ready!
This commit is contained in:
Simon Michael 2019-12-14 15:44:59 -08:00
parent 9612c1f917
commit 47567cd770
8 changed files with 9 additions and 9 deletions

View File

@ -372,7 +372,7 @@ getAccountAliases :: MonadState Journal m => m [AccountAlias]
getAccountAliases = fmap jparsealiases get
clearAccountAliases :: MonadState Journal m => m ()
clearAccountAliases = modify' (\(j@Journal{..}) -> j{jparsealiases=[]})
clearAccountAliases = modify' (\j -> j{jparsealiases=[]})
-- getTransactionCount :: MonadState Journal m => m Integer
-- getTransactionCount = fmap jparsetransactioncount get

View File

@ -66,7 +66,7 @@ flatShowsExclusiveBalance = True
-- This is like PeriodChangeReport with a single column (but more mature,
-- eg this can do hierarchical display).
balanceReport :: ReportOpts -> Query -> Journal -> BalanceReport
balanceReport ropts@ReportOpts{..} q j@Journal{..} =
balanceReport ropts@ReportOpts{..} q j =
(if invert_ then brNegate else id) $
(mappedsorteditems, mappedtotal)
where

View File

@ -104,7 +104,7 @@ multiBalanceReport ropts q j = multiBalanceReportWith ropts q j (journalPriceOra
-- run multiple reports (bs etc.) can generate the price oracle just once
-- for efficiency, passing it to each report by calling this function directly.
multiBalanceReportWith :: ReportOpts -> Query -> Journal -> PriceOracle -> MultiBalanceReport
multiBalanceReportWith ropts@ReportOpts{..} q j@Journal{..} priceoracle =
multiBalanceReportWith ropts@ReportOpts{..} q j priceoracle =
(if invert_ then mbrNegate else id) $
MultiBalanceReport (colspans, mappedsortedrows, mappedtotalsrow)
where

View File

@ -67,7 +67,7 @@ type SummaryPosting = (Posting, Day)
-- | Select postings from the journal and add running balance and other
-- information to make a postings report. Used by eg hledger's register command.
postingsReport :: ReportOpts -> Query -> Journal -> PostingsReport
postingsReport ropts@ReportOpts{..} q j@Journal{..} =
postingsReport ropts@ReportOpts{..} q j =
(totallabel, items)
where
reportspan = adjustReportDates ropts q j

View File

@ -511,7 +511,7 @@ reportPeriodStart ropts@ReportOpts{..} = do
-- the journal's start date (the earliest posting date). If there's no
-- report period and nothing in the journal, will be Nothing.
reportPeriodOrJournalStart :: ReportOpts -> Journal -> Maybe Day
reportPeriodOrJournalStart ropts@ReportOpts{..} j =
reportPeriodOrJournalStart ropts j =
reportPeriodStart ropts <|> journalStartDate False j
-- Get the last day of the overall report period.
@ -533,7 +533,7 @@ reportPeriodLastDay ropts@ReportOpts{..} = do
-- posting date). If there's no report period and nothing in the
-- journal, will be Nothing.
reportPeriodOrJournalLastDay :: ReportOpts -> Journal -> Maybe Day
reportPeriodOrJournalLastDay ropts@ReportOpts{..} j =
reportPeriodOrJournalLastDay ropts j =
reportPeriodLastDay ropts <|> journalEndDate False j
-- tests

View File

@ -45,7 +45,7 @@ transactionScreen = TransactionScreen{
tsInit :: Day -> Bool -> UIState -> UIState
tsInit _d _reset ui@UIState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=_ropts}}
,ajournal=_j
,aScreen=TransactionScreen{..}
,aScreen=TransactionScreen{}
} =
-- plog ("initialising TransactionScreen, value_ is "
-- -- ++ (pshow (Just (AtDefault Nothing)::Maybe ValuationType))

View File

@ -134,7 +134,7 @@ getAndAddTransactions es@EntryState{..} = (do
-- confirmedTransactionWizard :: (ArbitraryIO :<: b, OutputLn :<: b, Line :<: b) => EntryState -> Wizard b Transaction
-- confirmedTransactionWizard :: EntryState -> Wizard Haskeline Transaction
confirmedTransactionWizard es@EntryState{..} = do
confirmedTransactionWizard es = do
t <- transactionWizard es
-- liftIO $ hPrintf stderr {- "Transaction entered:\n%s" -} (show t)
output $ showTransaction t

View File

@ -55,7 +55,7 @@ registermode = hledgerCommandMode
-- | Print a (posting) register report.
register :: CliOpts -> Journal -> IO ()
register opts@CliOpts{reportopts_=ropts@ReportOpts{..}} j = do
register opts@CliOpts{reportopts_=ropts} j = do
d <- getCurrentDay
let fmt = outputFormatFromOpts opts
render | fmt=="csv" = const ((++"\n") . printCSV . postingsReportAsCsv)