From f0f4013b7a79496c086c5568109040fcb6af0259 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Oct 2016 14:15:56 -0700 Subject: [PATCH] ui: use latest brick, 0.11 --- hledger-ui/Hledger/UI/UITypes.hs | 8 ++++---- hledger-ui/Hledger/UI/UIUtils.hs | 2 +- hledger-ui/hledger-ui.cabal | 2 +- hledger-ui/package.yaml | 2 +- stack-ghc7.10.yaml | 3 ++- stack.yaml | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hledger-ui/Hledger/UI/UITypes.hs b/hledger-ui/Hledger/UI/UITypes.hs index 804b21dd4..02f6225cb 100644 --- a/hledger-ui/Hledger/UI/UITypes.hs +++ b/hledger-ui/Hledger/UI/UITypes.hs @@ -50,8 +50,8 @@ import Text.Show.Functions () import Hledger import Hledger.UI.UIOptions -instance Show (List n a) where show _ = "" -instance Show (Editor n) where show _ = "" +instance Show (List n e) where show _ = "" +instance Show (Editor l n) where show _ = "" -- | hledger-ui's application state. This holds one or more stateful screens. -- As you navigate through screens, the old ones are saved in a stack. @@ -70,11 +70,11 @@ data UIState = UIState { data Mode = Normal | Help - | Minibuffer (Editor Name) + | Minibuffer (Editor String Name) deriving (Show,Eq) -- Ignore the editor when comparing Modes. -instance Eq (Editor n) where _ == _ = True +instance Eq (Editor l n) where _ == _ = True -- Unique names required for widgets, viewports, cursor locations etc. data Name = diff --git a/hledger-ui/Hledger/UI/UIUtils.hs b/hledger-ui/Hledger/UI/UIUtils.hs index c9d59e117..ed2cb4e48 100644 --- a/hledger-ui/Hledger/UI/UIUtils.hs +++ b/hledger-ui/Hledger/UI/UIUtils.hs @@ -122,7 +122,7 @@ helpHandle ui ev = ui' = setMode Normal ui -- | Draw the minibuffer. -minibuffer :: Editor Name -> Widget Name +minibuffer :: Editor String Name -> Widget Name minibuffer ed = forceAttr (borderAttr <> "minibuffer") $ hBox $ diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index 877d8a569..0c6e3d755 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -82,7 +82,7 @@ executable hledger-ui buildable: False else build-depends: - brick >= 0.7 && < 0.9 + brick >= 0.11 && < 0.12 , vty >= 5.5 && < 5.12 if flag(threaded) ghc-options: -threaded diff --git a/hledger-ui/package.yaml b/hledger-ui/package.yaml index 94adbd4e4..9db46e62c 100644 --- a/hledger-ui/package.yaml +++ b/hledger-ui/package.yaml @@ -85,7 +85,7 @@ executables: buildable: false else: dependencies: - - brick >= 0.7 && < 0.9 + - brick >= 0.11 && < 0.12 - vty >= 5.5 && < 5.12 - condition: flag(threaded) ghc-options: -threaded diff --git a/stack-ghc7.10.yaml b/stack-ghc7.10.yaml index 574354f3c..86191a202 100644 --- a/stack-ghc7.10.yaml +++ b/stack-ghc7.10.yaml @@ -11,5 +11,6 @@ packages: - hledger-api extra-deps: -- brick-0.8 +- brick-0.11 +- text-zipper-0.8.1 - megaparsec-5.1.2 diff --git a/stack.yaml b/stack.yaml index 41bf6fb25..cf2990701 100644 --- a/stack.yaml +++ b/stack.yaml @@ -12,7 +12,7 @@ packages: extra-deps: # for hledger-ui: -- brick-0.8 +- brick-0.11 - text-zipper-0.8.1 - vty-5.11.3 # for hledger-web: