guide: update for vty 6

This commit is contained in:
Jonathan Daugherty 2023-10-24 14:38:05 -07:00
parent 250c8b471b
commit c1eeeb1d01
2 changed files with 13 additions and 4 deletions

View File

@ -13,7 +13,9 @@ pattern-matching on incoming events and updating your application state.
Under the hood, this library builds upon
[vty](http://hackage.haskell.org/package/vty), so some knowledge of Vty
will be necessary to use this library.
will be necessary to use this library. Brick depends on
`vty-crossplatform`, so Brick should work anywhere Vty works (Unix and
Windows).
Example
-------
@ -185,8 +187,8 @@ Reporting bugs
Please file bug reports as GitHub issues. For best results:
- Include the versions of relevant software packages: your terminal
emulator, `brick`, `ghc`, and `vty` will be the most important
ones.
emulator, `brick`, `ghc`, `vty`, and Vty platform packages will be
the most important ones.
- Clearly describe the behavior you expected ...

View File

@ -53,6 +53,13 @@ To clone and build locally::
$ cd brick
$ cabal new-build
Your package will need some dependencies:
* ``brick``,
* ``vty >= 6.0``, and
* ``vty-crossplatform`` or ``vty-unix`` or ``vty-windows``, depending
on which platform(s) your application supports.
Building the Demonstration Programs
-----------------------------------
@ -403,7 +410,7 @@ our events over that channel. Once we've created the channel with
main :: IO ()
main = do
eventChan <- Brick.BChan.newBChan 10
let buildVty = Graphics.Vty.mkVty Graphics.Vty.defaultConfig
let buildVty = Graphics.Vty.CrossPlatform.mkVty Graphics.Vty.Config.defaultConfig
initialVty <- buildVty
finalState <- customMain initialVty buildVty
(Just eventChan) app initialState