mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-29 21:46:11 +03:00
guide.rst: update Editor example
This commit is contained in:
parent
3280c0c799
commit
aeb7bf972a
@ -247,7 +247,7 @@ of state in your application state. In the following example we use an
|
||||
.. code:: haskell
|
||||
|
||||
data Name = Edit1
|
||||
type MyState = Editor Name
|
||||
type MyState = Editor String Name
|
||||
|
||||
myEvent :: MyState -> e -> EventM Name (Next MyState)
|
||||
myEvent s e = continue =<< handleEditorEvent e s
|
||||
@ -262,7 +262,7 @@ for your application state fields, you can use the convenience function
|
||||
.. code:: haskell
|
||||
|
||||
data Name = Edit1
|
||||
data MyState = MyState { _theEdit :: Editor Name
|
||||
data MyState = MyState { _theEdit :: Editor String Name
|
||||
}
|
||||
makeLenses ''MyState
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user