packages feed

brick 0.54 → 0.55

raw patch · 4 files changed

+32/−2 lines, 4 filesdep ~basedep ~vtyPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, vty

API changes (from Hackage documentation)

- Brick.BorderMap: eBottomL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.BorderMap: eBottomL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.BorderMap: eLeftL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.BorderMap: eLeftL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.BorderMap: eRightL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.BorderMap: eRightL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.BorderMap: eTopL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.BorderMap: eTopL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.Types: bordersL :: forall n_aGKp. Lens' (Result n_aGKp) (BorderMap DynBorder)
+ Brick.Types: bordersL :: forall n_aGOH. Lens' (Result n_aGOH) (BorderMap DynBorder)
- Brick.Types: cursorLocationL :: forall n_aFp0. Lens' (CursorLocation n_aFp0) Location
+ Brick.Types: cursorLocationL :: forall n_aFti. Lens' (CursorLocation n_aFti) Location
- Brick.Types: cursorLocationNameL :: forall n_aFp0 n_aHnB. Lens (CursorLocation n_aFp0) (CursorLocation n_aHnB) (Maybe n_aFp0) (Maybe n_aHnB)
+ Brick.Types: cursorLocationNameL :: forall n_aFti n_aHrT. Lens (CursorLocation n_aFti) (CursorLocation n_aHrT) (Maybe n_aFti) (Maybe n_aHrT)
- Brick.Types: cursorsL :: forall n_aGKp. Lens' (Result n_aGKp) [CursorLocation n_aGKp]
+ Brick.Types: cursorsL :: forall n_aGOH. Lens' (Result n_aGOH) [CursorLocation n_aGOH]
- Brick.Types: eBottomL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.Types: eBottomL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.Types: eLeftL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.Types: eLeftL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.Types: eRightL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.Types: eRightL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.Types: eTopL :: forall a_ajBI. Lens' (Edges a_ajBI) a_ajBI
+ Brick.Types: eTopL :: forall a_ajFE. Lens' (Edges a_ajFE) a_ajFE
- Brick.Types: extentsL :: forall n_aGKp. Lens' (Result n_aGKp) [Extent n_aGKp]
+ Brick.Types: extentsL :: forall n_aGOH. Lens' (Result n_aGOH) [Extent n_aGOH]
- Brick.Types: imageL :: forall n_aGKp. Lens' (Result n_aGKp) Image
+ Brick.Types: imageL :: forall n_aGOH. Lens' (Result n_aGOH) Image
- Brick.Types: visibilityRequestsL :: forall n_aGKp. Lens' (Result n_aGKp) [VisibilityRequest]
+ Brick.Types: visibilityRequestsL :: forall n_aGOH. Lens' (Result n_aGOH) [VisibilityRequest]
- Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1hvC a_a1hwj. Lens (Dialog a_a1hvC) (Dialog a_a1hwj) [(String, a_a1hvC)] [(String, a_a1hwj)]
+ Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1hzU a_a1hAB. Lens (Dialog a_a1hzU) (Dialog a_a1hAB) [(String, a_a1hzU)] [(String, a_a1hAB)]
- Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1hvC. Lens' (Dialog a_a1hvC) (Maybe Int)
+ Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1hzU. Lens' (Dialog a_a1hzU) (Maybe Int)
- Brick.Widgets.Dialog: dialogTitleL :: forall a_a1hvC. Lens' (Dialog a_a1hvC) (Maybe String)
+ Brick.Widgets.Dialog: dialogTitleL :: forall a_a1hzU. Lens' (Dialog a_a1hzU) (Maybe String)
- Brick.Widgets.Dialog: dialogWidthL :: forall a_a1hvC. Lens' (Dialog a_a1hvC) Int
+ Brick.Widgets.Dialog: dialogWidthL :: forall a_a1hzU. Lens' (Dialog a_a1hzU) Int
- Brick.Widgets.Edit: editContentsL :: forall t_a1coc n_a1cod t_a1coW. Lens (Editor t_a1coc n_a1cod) (Editor t_a1coW n_a1cod) (TextZipper t_a1coc) (TextZipper t_a1coW)
+ Brick.Widgets.Edit: editContentsL :: forall t_a1csu n_a1csv t_a1cte. Lens (Editor t_a1csu n_a1csv) (Editor t_a1cte n_a1csv) (TextZipper t_a1csu) (TextZipper t_a1cte)
- Brick.Widgets.FileBrowser: fileBrowserEntryFilterL :: forall n_a1rW9. Lens' (FileBrowser n_a1rW9) (Maybe (FileInfo -> Bool))
+ Brick.Widgets.FileBrowser: fileBrowserEntryFilterL :: forall n_a1sbl. Lens' (FileBrowser n_a1sbl) (Maybe (FileInfo -> Bool))
- Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1rW9. Lens' (FileBrowser n_a1rW9) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1sbl. Lens' (FileBrowser n_a1sbl) (FileInfo -> Bool)
- Brick.Widgets.List: listElementsL :: forall n_a1mzv t_a1mzw e_a1mzx t_a1mO5 e_a1mO6. Lens (GenericList n_a1mzv t_a1mzw e_a1mzx) (GenericList n_a1mzv t_a1mO5 e_a1mO6) (t_a1mzw e_a1mzx) (t_a1mO5 e_a1mO6)
+ Brick.Widgets.List: listElementsL :: forall n_a1mOG t_a1mOH e_a1mOI t_a1n3h e_a1n3i. Lens (GenericList n_a1mOG t_a1mOH e_a1mOI) (GenericList n_a1mOG t_a1n3h e_a1n3i) (t_a1mOH e_a1mOI) (t_a1n3h e_a1n3i)
- Brick.Widgets.List: listItemHeightL :: forall n_a1mzv t_a1mzw e_a1mzx. Lens' (GenericList n_a1mzv t_a1mzw e_a1mzx) Int
+ Brick.Widgets.List: listItemHeightL :: forall n_a1mOG t_a1mOH e_a1mOI. Lens' (GenericList n_a1mOG t_a1mOH e_a1mOI) Int
- Brick.Widgets.List: listNameL :: forall n_a1mzv t_a1mzw e_a1mzx n_a1mO7. Lens (GenericList n_a1mzv t_a1mzw e_a1mzx) (GenericList n_a1mO7 t_a1mzw e_a1mzx) n_a1mzv n_a1mO7
+ Brick.Widgets.List: listNameL :: forall n_a1mOG t_a1mOH e_a1mOI n_a1n3j. Lens (GenericList n_a1mOG t_a1mOH e_a1mOI) (GenericList n_a1n3j t_a1mOH e_a1mOI) n_a1mOG n_a1n3j
- Brick.Widgets.List: listSelectedL :: forall n_a1mzv t_a1mzw e_a1mzx. Lens' (GenericList n_a1mzv t_a1mzw e_a1mzx) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: forall n_a1mOG t_a1mOH e_a1mOI. Lens' (GenericList n_a1mOG t_a1mOH e_a1mOI) (Maybe Int)

Files

CHANGELOG.md view
@@ -2,6 +2,19 @@ Brick changelog --------------- +0.55+----++Package changes:+ * Increased lower bound on `vty` dependency to 5.29.++Bug fixes:+ * `customMain` now restores the initial terminal input state on+   shutdown. This means that changes to the input state flags in the last+   `suspendAndResume` before program exit are no longer propagated to the+   end user's terminal environment (which could lead to broken or garbled+   terminal I/O).+ 0.54 ---- 
README.md view
@@ -62,6 +62,7 @@  * [`sudoku-tui`](https://github.com/evanrelf/sudoku-tui), a Sudoku implementation  * [`summoner-tui`](https://github.com/kowainik/summoner/tree/master/summoner-tui), an interactive frontend to the Summoner tool  * [`wrapping-editor`](https://github.com/ta0kira/wrapping-editor), an embeddable editor with support for Brick+ * [`git-brunch`](https://github.com/andys8/git-brunch), a git branch checkout utility  These third-party packages also extend `brick`: 
brick.cabal view
@@ -1,5 +1,5 @@ name:                brick-version:             0.54+version:             0.55 synopsis:            A declarative terminal user interface library description:   Write terminal user interfaces (TUIs) painlessly with 'brick'! You@@ -114,7 +114,7 @@     Brick.Widgets.Internal    build-depends:       base <= 4.14.0.0,-                       vty >= 5.24,+                       vty >= 5.29,                        transformers,                        data-clist >= 0.1,                        directory >= 1.2.5.0,
src/Brick/Main.hs view
@@ -75,6 +75,8 @@   , nextEvent   , mkVty   , defaultConfig+  , restoreInputState+  , inputIface   ) import Graphics.Vty.Attributes (defAttr) @@ -202,6 +204,10 @@ -- | The custom event loop entry point to use when the simpler ones -- don't permit enough control. Returns the final application state -- after the application halts.+--+-- Note that this function guarantees that the terminal input state+-- prior to the first Vty initialization is the terminal input state+-- that is restored on shutdown (regardless of exceptions). customMain :: (Ord n)            => Vty            -- ^ The initial Vty handle to use.@@ -221,8 +227,13 @@            -- ^ The initial application state.            -> IO s customMain initialVty buildVty mUserChan app initialAppState = do+    let restoreInitialState = restoreInputState $ inputIface initialVty+     (s, vty) <- customMainWithVty initialVty buildVty mUserChan app initialAppState+        `E.catch` (\(e::E.SomeException) -> restoreInitialState >> E.throw e)+     shutdown vty+    restoreInitialState     return s  -- | Like 'customMain', except the last 'Vty' handle used by the@@ -526,5 +537,10 @@ -- specified action. When it returns an application state value, restore -- the terminal state, empty the rendering cache, redraw the application -- from the new state, and resume the event loop.+--+-- Note that any changes made to the terminal's input state are ignored+-- when Brick resumes execution and are not preserved in the final+-- terminal input state after the Brick application returns the terminal+-- to the user. suspendAndResume :: IO s -> EventM n (Next s) suspendAndResume = return . SuspendAndResume