imp: ghc9.2: silence incomplete-record-updates warnings

This commit is contained in:
Simon Michael 2022-03-25 20:36:12 -10:00
parent d9ecd1eb9d
commit 3eddd913e3
4 changed files with 12 additions and 1 deletions

View File

@ -3,6 +3,7 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module Hledger.UI.ErrorScreen
(errorScreen
@ -162,6 +163,14 @@ uiReloadJournal copts d ui = do
case ui of
UIState{aScreen=s@ErrorScreen{}} -> ui{aScreen=s{esError=err}}
_ -> screenEnter d errorScreen{esError=err} ui
-- XXX GHC 9.2 warning:
-- hledger-ui/Hledger/UI/ErrorScreen.hs:164:59: warning: [-Wincomplete-record-updates]
-- Pattern match(es) are non-exhaustive
-- In a record-update construct:
-- Patterns of type Screen not matched:
-- AccountsScreen _ _ _ _ _
-- RegisterScreen _ _ _ _ _ _
-- TransactionScreen _ _ _ _ _ _
-- | Like uiReloadJournal, but does not re-parse the journal if the file(s)
-- have not changed since last loaded. Always regenerates the screens though,

View File

@ -4,6 +4,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module Hledger.UI.RegisterScreen
(registerScreen

View File

@ -3,6 +3,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module Hledger.UI.TransactionScreen
( transactionScreen

View File

@ -26,7 +26,7 @@ extra-deps:
# silence new warnings temporarily
ghc-options:
"$locals": -Wno-incomplete-uni-patterns -Wno-incomplete-record-updates
"$locals": -Wno-incomplete-uni-patterns
nix:
pure: false