packages feed

hledger-ui 1.25 → 1.26

raw patch · 8 files changed

+36/−20 lines, 8 filesdep +mtldep ~doclayoutdep ~hledgerdep ~hledger-lib

Dependencies added: mtl

Dependency ranges changed: doclayout, hledger, hledger-lib

Files

CHANGES.md view
@@ -9,6 +9,10 @@ User-visible changes in hledger-ui. See also the hledger changelog. +# 1.26 2022-06-04++- Uses hledger 1.26.+ # 1.25 2022-03-04  - Uses hledger 1.25.
Hledger/UI/ErrorScreen.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE FlexibleContexts  #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-}+{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}  module Hledger.UI.ErrorScreen  (errorScreen@@ -15,7 +16,7 @@ import Brick -- import Brick.Widgets.Border ("border") import Control.Monad-import Control.Monad.IO.Class (liftIO)+import Control.Monad.Except (liftIO) import Data.Time.Calendar (Day) import Data.Void (Void) import Graphics.Vty (Event(..),Key(..),Modifier(..))@@ -155,26 +156,32 @@ uiReloadJournal copts d ui = do   ej <-     let copts' = enableForecastPreservingPeriod ui copts-    in journalReload copts'+    in runExceptT $ journalReload copts'   return $ case ej of     Right j  -> regenerateScreens j d ui     Left err ->       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, -- since the provided options or today-date may have changed. uiReloadJournalIfChanged :: CliOpts -> Day -> Journal -> UIState -> IO UIState uiReloadJournalIfChanged copts d j ui = do-  (ej, _changed) <--    let copts' = enableForecastPreservingPeriod ui copts-    in journalReloadIfChanged copts' d j+  let copts' = enableForecastPreservingPeriod ui copts+  ej <- runExceptT $ journalReloadIfChanged copts' d j   return $ case ej of-    Right j' -> regenerateScreens j' d ui-    Left err ->-      case ui of+    Right (j', _) -> regenerateScreens j' d ui+    Left err -> case ui of         UIState{aScreen=s@ErrorScreen{}} -> ui{aScreen=s{esError=err}}         _                                -> screenEnter d errorScreen{esError=err} ui 
Hledger/UI/RegisterScreen.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-} {-# LANGUAGE NamedFieldPuns #-}+{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}  module Hledger.UI.RegisterScreen  (registerScreen@@ -69,6 +70,8 @@     ropts' = ropts {         -- ignore any depth limit, as in postingsReport; allows register's total to match accounts screen         depth_=Nothing+        -- do not strip prices so we can toggle costs within the ui+      , show_costs_=True       -- XXX aregister also has this, needed ?         -- always show historical balance       -- , balanceaccum_= Historical
Hledger/UI/TransactionScreen.hs view
@@ -3,13 +3,14 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-} {-# LANGUAGE TupleSections     #-}+{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}  module Hledger.UI.TransactionScreen ( transactionScreen ) where  import Control.Monad-import Control.Monad.IO.Class (liftIO)+import Control.Monad.Except (liftIO) import Data.List import Data.Maybe import qualified Data.Text as T@@ -174,7 +175,7 @@             p = reportPeriod ui         e | e `elem` [VtyEvent (EvKey (KChar 'g') []), AppEvent FileChange] -> do           -- plog (if e == AppEvent FileChange then "file change" else "manual reload") "" `seq` return ()-          ej <- liftIO $ journalReload copts+          ej <- liftIO . runExceptT $ journalReload copts           case ej of             Left err -> continue $ screenEnter d errorScreen{esError=err} ui             Right j' -> continue $ regenerateScreens j' d ui
hledger-ui.1 view
@@ -1,5 +1,5 @@ -.TH "HLEDGER-UI" "1" "March 2022" "hledger-ui-1.25 " "hledger User Manuals"+.TH "HLEDGER-UI" "1" "June 2022" "hledger-ui-1.26 " "hledger User Manuals"   @@ -7,7 +7,7 @@ .PP hledger-ui is a terminal interface (TUI) for the hledger accounting tool.-This manual is for hledger-ui 1.25.+This manual is for hledger-ui 1.26. .SH SYNOPSIS .PP \f[C]hledger-ui [OPTIONS] [QUERYARGS]\f[R]
hledger-ui.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           hledger-ui-version:        1.25+version:        1.26 synopsis:       Curses-style terminal interface for the hledger accounting system description:    A simple curses-style terminal user interface for the hledger accounting system.                 It can be a more convenient way to browse your accounts than the CLI.@@ -62,8 +62,8 @@       Paths_hledger_ui   hs-source-dirs:       ./-  ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans-  cpp-options: -DVERSION="1.25"+  ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind+  cpp-options: -DVERSION="1.26"   build-depends:       ansi-terminal >=0.9     , async@@ -77,11 +77,12 @@     , extra >=1.6.3     , filepath     , fsnotify >=0.2.1.2 && <0.4-    , hledger ==1.25.*-    , hledger-lib ==1.25.*+    , hledger ==1.26.*+    , hledger-lib ==1.26.*     , megaparsec >=7.0.0 && <9.3     , microlens >=0.4     , microlens-platform >=0.2.3.1+    , mtl >=2.2.1     , process >=1.2     , safe >=0.2     , split >=0.1
hledger-ui.info view
@@ -12,7 +12,7 @@ *************  hledger-ui is a terminal interface (TUI) for the hledger accounting-tool.  This manual is for hledger-ui 1.25.+tool.  This manual is for hledger-ui 1.26.     'hledger-ui [OPTIONS] [QUERYARGS]' 'hledger ui -- [OPTIONS] [QUERYARGS]'
hledger-ui.txt view
@@ -5,7 +5,7 @@  NAME        hledger-ui  is  a  terminal  interface (TUI) for the hledger accounting-       tool.  This manual is for hledger-ui 1.25.+       tool.  This manual is for hledger-ui 1.26.  SYNOPSIS        hledger-ui [OPTIONS] [QUERYARGS]@@ -548,4 +548,4 @@   -hledger-ui-1.25                   March 2022                     HLEDGER-UI(1)+hledger-ui-1.26                    June 2022                     HLEDGER-UI(1)