ui: use latest brick, 0.11

This commit is contained in:
Simon Michael 2016-10-27 14:15:56 -07:00
parent 5d792e2133
commit f0f4013b7a
6 changed files with 10 additions and 9 deletions

View File

@ -50,8 +50,8 @@ import Text.Show.Functions ()
import Hledger import Hledger
import Hledger.UI.UIOptions import Hledger.UI.UIOptions
instance Show (List n a) where show _ = "<List>" instance Show (List n e) where show _ = "<List>"
instance Show (Editor n) where show _ = "<Editor>" instance Show (Editor l n) where show _ = "<Editor>"
-- | hledger-ui's application state. This holds one or more stateful screens. -- | 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. -- As you navigate through screens, the old ones are saved in a stack.
@ -70,11 +70,11 @@ data UIState = UIState {
data Mode = data Mode =
Normal Normal
| Help | Help
| Minibuffer (Editor Name) | Minibuffer (Editor String Name)
deriving (Show,Eq) deriving (Show,Eq)
-- Ignore the editor when comparing Modes. -- 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. -- Unique names required for widgets, viewports, cursor locations etc.
data Name = data Name =

View File

@ -122,7 +122,7 @@ helpHandle ui ev =
ui' = setMode Normal ui ui' = setMode Normal ui
-- | Draw the minibuffer. -- | Draw the minibuffer.
minibuffer :: Editor Name -> Widget Name minibuffer :: Editor String Name -> Widget Name
minibuffer ed = minibuffer ed =
forceAttr (borderAttr <> "minibuffer") $ forceAttr (borderAttr <> "minibuffer") $
hBox $ hBox $

View File

@ -82,7 +82,7 @@ executable hledger-ui
buildable: False buildable: False
else else
build-depends: build-depends:
brick >= 0.7 && < 0.9 brick >= 0.11 && < 0.12
, vty >= 5.5 && < 5.12 , vty >= 5.5 && < 5.12
if flag(threaded) if flag(threaded)
ghc-options: -threaded ghc-options: -threaded

View File

@ -85,7 +85,7 @@ executables:
buildable: false buildable: false
else: else:
dependencies: dependencies:
- brick >= 0.7 && < 0.9 - brick >= 0.11 && < 0.12
- vty >= 5.5 && < 5.12 - vty >= 5.5 && < 5.12
- condition: flag(threaded) - condition: flag(threaded)
ghc-options: -threaded ghc-options: -threaded

View File

@ -11,5 +11,6 @@ packages:
- hledger-api - hledger-api
extra-deps: extra-deps:
- brick-0.8 - brick-0.11
- text-zipper-0.8.1
- megaparsec-5.1.2 - megaparsec-5.1.2

View File

@ -12,7 +12,7 @@ packages:
extra-deps: extra-deps:
# for hledger-ui: # for hledger-ui:
- brick-0.8 - brick-0.11
- text-zipper-0.8.1 - text-zipper-0.8.1
- vty-5.11.3 - vty-5.11.3
# for hledger-web: # for hledger-web: