Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-brick for openSUSE:Factory 
checked in at 2022-02-11 23:08:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-brick (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-brick.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-brick"

Fri Feb 11 23:08:38 2022 rev:19 rq:953440 version:0.67

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-brick/ghc-brick.changes      2021-12-19 
17:35:00.292288959 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-brick.new.1956/ghc-brick.changes    
2022-02-11 23:10:34.955149542 +0100
@@ -1,0 +2,9 @@
+Mon Jan 31 17:17:26 UTC 2022 - Peter Simons <[email protected]>
+
+- Update brick to version 0.67.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/brick-0.67/src/CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  brick-0.65.tar.gz

New:
----
  brick-0.67.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-brick.spec ++++++
--- /var/tmp/diff_new_pack.tXTHT2/_old  2022-02-11 23:10:35.355150699 +0100
+++ /var/tmp/diff_new_pack.tXTHT2/_new  2022-02-11 23:10:35.359150711 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-brick
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name brick
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.65
+Version:        0.67
 Release:        0
 Summary:        A declarative terminal user interface library
 License:        BSD-3-Clause

++++++ brick-0.65.tar.gz -> brick-0.67.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/CHANGELOG.md new/brick-0.67/CHANGELOG.md
--- old/brick-0.65/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
@@ -2,6 +2,52 @@
 Brick changelog
 ---------------
 
+0.67
+----
+
+API changes:
+ * `Brick.Widgets.FileBrowser` now exports getters for all
+   `FileBrowser` fields. These getters are lens-like accessors
+   with the `G` suffix.
+ * `Brick.Widgets.FileBrowser` no longer exports the
+   `fileBrowserEntryFilterL` lens. The lens broke the API
+   because it allowed modification of internal state that could
+   lead to inconsistency in the UI. Users who needed to use
+   `fileBrowserEntryFilterL` before this change should use
+   `setFileBrowserEntryFilter` instead.
+
+0.66.1
+------
+
+Bug fixes:
+ * `Brick.Widgets.Core.cached` no longer caches the visibility requests
+   generated by the cached image. This fixes a bug where re-use of a
+   cached rendering would cause undesired viewport scrolling of those
+   requested regions into view when the cached renderings got re-used.
+
+0.66
+----
+
+New features:
+ * Added `Brick.Main.makeVisible`, a function to request visible regions
+   from `EventM`. This, together with `Brick.Widgets.Core.reportExtent`,
+   can be used to request that a viewport be scrolled to make a
+   specified named region visible on the next redraw. The region must be
+   known to the renderer with `reportExtent` (or something that calls
+   it, like `clickable`). Due to the `Ord` constraint on some of the API
+   calls required to implement this, an `Ord` constraint on the resource
+   name type (`n`) got propagated to various places in the API. But that
+   shouldn't present a problem since other fundamental API calls already
+   required that instance.
+
+0.65.1
+------
+
+Bug fixes:
+ * `Brick.Widgets.Core.viewport`: fixed non-scroll
+   direction width/height in the presence of scroll bars (see
+   e41ad936ebe8b49e259a72ff7a34765d5a587aaa).
+
 0.65
 ----
 
@@ -38,6 +84,8 @@
    * `scrollbarAttr` - the base attribute of scroll bars
    * `scrollbarTroughAttr` - the attribute of scroll bar troughs
    * `scrollbarHandleAttr` - the attribute of scroll bar handles
+ * The `Context` type got the `n` type argument that is used for
+   `Result`, `EventM`, etc.
 
 Package changes:
  * Raised `base` bounds to allow building with GHC 9.2.1 (thanks Mario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/brick.cabal new/brick-0.67/brick.cabal
--- old/brick-0.65/brick.cabal  2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/brick.cabal  2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 name:                brick
-version:             0.65
+version:             0.67
 synopsis:            A declarative terminal user interface library
 description:
   Write terminal user interfaces (TUIs) painlessly with 'brick'! You
@@ -32,7 +32,7 @@
 license-file:        LICENSE
 author:              Jonathan Daugherty <[email protected]>
 maintainer:          Jonathan Daugherty <[email protected]>
-copyright:           (c) Jonathan Daugherty 2015-2020
+copyright:           (c) Jonathan Daugherty 2015-2021
 category:            Graphics
 build-type:          Simple
 cabal-version:       1.18
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/docs/guide.rst 
new/brick-0.67/docs/guide.rst
--- old/brick-0.65/docs/guide.rst       2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/docs/guide.rst       2001-09-09 03:46:40.000000000 +0200
@@ -1245,6 +1245,13 @@
 column of available space if vertical scroll bars are enabled and one
 row of available space if horizontal scroll bars are enabled.
 
+Scroll bars can also be configured to draw "handles" with
+``withHScrollBarHandles`` and ``withVScrollBarHandles``.
+
+Lastly, scroll bars can be configured to report mouse events on
+each scroll bar element. To enable mouse click reporting, use
+``withClickableHScrollBars`` and ``withClickableVScrollBars``.
+
 For a demonstration of the scroll bar API in action, see the
 ``ViewportScrollbarsDemo.hs`` demonstration program.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/docs/samtay-tutorial.md 
new/brick-0.67/docs/samtay-tutorial.md
--- old/brick-0.65/docs/samtay-tutorial.md      2001-09-09 03:46:40.000000000 
+0200
+++ new/brick-0.67/docs/samtay-tutorial.md      2001-09-09 03:46:40.000000000 
+0200
@@ -24,7 +24,7 @@
 1. [Demo programs](https://github.com/jtdaugherty/brick/tree/master/programs)
 (clone down to explore the code and run them locally)
 2. [User 
guide](https://github.com/jtdaugherty/brick/blob/master/docs/guide.rst)
-3. [Haddock docs](https://hackage.haskell.org/package/brick-0.18)
+3. [Haddock docs](https://hackage.haskell.org/package/brick)
 4. [Google group](https://groups.google.com/forum/#!forum/brick-users)
 
 ### The basic idea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Focus.hs 
new/brick-0.67/src/Brick/Focus.hs
--- old/brick-0.65/src/Brick/Focus.hs   2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick/Focus.hs   2001-09-09 03:46:40.000000000 +0200
@@ -16,7 +16,7 @@
 where
 
 import Lens.Micro ((^.))
-import Data.Maybe (listToMaybe)
+import Data.List (find)
 import qualified Data.CircularList as C
 
 import Brick.Types
@@ -64,7 +64,7 @@
 withFocusRing ring f a = f (focusGetCurrent ring == Just (getName a)) a
 
 -- | Get the currently-focused resource name from the ring. If the ring
--- is emtpy, return 'Nothing'.
+-- is empty, return 'Nothing'.
 focusGetCurrent :: FocusRing n -> Maybe n
 focusGetCurrent (FocusRing l) = C.focus l
 
@@ -107,8 +107,5 @@
                 -> Maybe (CursorLocation n)
                 -- ^ The cursor position, if any, that matches the
                 -- resource name currently focused by the 'FocusRing'.
-focusRingCursor getRing st ls =
-    listToMaybe $ filter isCurrent ls
-    where
-        isCurrent cl = cl^.cursorLocationNameL ==
-                       (focusGetCurrent $ getRing st)
+focusRingCursor getRing st = find $ \cl ->
+    cl^.cursorLocationNameL == focusGetCurrent (getRing st)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Forms.hs 
new/brick-0.67/src/Brick/Forms.hs
--- old/brick-0.65/src/Brick/Forms.hs   2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick/Forms.hs   2001-09-09 03:46:40.000000000 +0200
@@ -343,7 +343,7 @@
                       , formFieldConcat = vBox
                       }
 
-renderCheckbox :: Char -> Char -> Char -> T.Text -> n -> Bool -> Bool -> 
Widget n
+renderCheckbox :: (Ord n) => Char -> Char -> Char -> T.Text -> n -> Bool -> 
Bool -> Widget n
 renderCheckbox lb check rb label n foc val =
     let addAttr = if foc then withDefAttr focusedFormInputAttr else id
         csr = if foc then putCursor n (Location (1,0)) else id
@@ -469,7 +469,7 @@
                       , formFieldConcat = vBox
                       }
 
-renderRadio :: (Eq a) => Char -> Char -> Char -> a -> n -> T.Text -> Bool -> a 
-> Widget n
+renderRadio :: (Eq a, Ord n) => Char -> Char -> Char -> a -> n -> T.Text -> 
Bool -> a -> Widget n
 renderRadio lb check rb val name label foc cur =
     let addAttr = if foc
                   then withDefAttr focusedFormInputAttr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Main.hs 
new/brick-0.67/src/Brick/Main.hs
--- old/brick-0.65/src/Brick/Main.hs    2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick/Main.hs    2001-09-09 03:46:40.000000000 +0200
@@ -13,6 +13,7 @@
   , continueWithoutRedraw
   , halt
   , suspendAndResume
+  , makeVisible
   , lookupViewport
   , lookupExtent
   , findClickedExtents
@@ -275,12 +276,12 @@
                     newVty <- buildVty
                     run newVty (newRS { renderCache = mempty }) newAppState 
brickChan
 
-    let emptyES = ES [] mempty
-        emptyRS = RS M.empty mempty S.empty mempty mempty
+    let emptyES = ES [] mempty mempty
+        emptyRS = RS M.empty mempty S.empty mempty mempty mempty
         eventRO = EventRO M.empty initialVty mempty emptyRS
 
     (st, eState) <- runStateT (runReaderT (runEventM (appStartEvent app 
initialAppState)) eventRO) emptyES
-    let initialRS = RS M.empty (esScrollRequests eState) S.empty mempty []
+    let initialRS = RS M.empty (esScrollRequests eState) S.empty mempty [] 
(requestedVisibleNames eState)
     brickChan <- newBChan 20
     run initialVty initialRS st brickChan
 
@@ -364,7 +365,7 @@
                 _ -> return (e, firstRS, exts)
         _ -> return (e, firstRS, exts)
 
-    let emptyES = ES [] mempty
+    let emptyES = ES [] mempty mempty
         eventRO = EventRO (viewportMap nextRS) vty nextExts nextRS
 
     (next, eState) <- runStateT (runReaderT (runEventM (appHandleEvent app 
appState e'))
@@ -373,6 +374,7 @@
            , nextRS { rsScrollRequests = esScrollRequests eState
                     , renderCache = applyInvalidations 
(cacheInvalidateRequests eState) $
                                     renderCache nextRS
+                    , requestedVisibleNames_ = requestedVisibleNames eState
                     }
            , nextExts
            )
@@ -390,7 +392,15 @@
 -- information from the most recent rendering. Returns 'Nothing' if
 -- no such state could be found, either because the name was invalid
 -- or because no rendering has occurred (e.g. in an 'appStartEvent'
--- handler).
+-- handler). An important consequence of this behavior is that if this
+-- function is called before a viewport is rendered for the first
+-- time, no state will be found because the renderer only knows about
+-- viewports it has rendered in the most recent rendering. As a result,
+-- if you need to make viewport transformations before they are drawn
+-- for the first time, you may need to use 'viewportScroll' and its
+-- associated functions without relying on this function. Those
+-- functions queue up scrolling requests that can be made in advance of
+-- the next rendering to affect the viewport.
 lookupViewport :: (Ord n) => n -> EventM n (Maybe Viewport)
 lookupViewport n = EventM $ asks (M.lookup n . eventViewportMap)
 
@@ -571,3 +581,11 @@
 -- to the user.
 suspendAndResume :: IO s -> EventM n (Next s)
 suspendAndResume = return . SuspendAndResume
+
+-- | Request that the specified UI element be made visible on the
+-- next rendering. This is provided to allow event handlers to make
+-- visibility requests in the same way that the 'visible' function does
+-- at rendering time.
+makeVisible :: (Ord n) => n -> EventM n ()
+makeVisible n = EventM $ do
+    lift $ modify (\s -> s { requestedVisibleNames = S.insert n $ 
requestedVisibleNames s })
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Types/Internal.hs 
new/brick-0.67/src/Brick/Types/Internal.hs
--- old/brick-0.65/src/Brick/Types/Internal.hs  2001-09-09 03:46:40.000000000 
+0200
+++ new/brick-0.67/src/Brick/Types/Internal.hs  2001-09-09 03:46:40.000000000 
+0200
@@ -66,6 +66,7 @@
   , clickableNamesL
   , renderCacheL
   , observedNamesL
+  , requestedVisibleNames_L
   , vpSize
   , vpLeft
   , vpTop
@@ -138,6 +139,7 @@
        , observedNames :: !(S.Set n)
        , renderCache :: !(M.Map n ([n], Result n))
        , clickableNames :: ![n]
+       , requestedVisibleNames_ :: !(S.Set n)
        } deriving (Read, Show, Generic, NFData)
 
 -- | The type of the rendering monad. This monad is used by the
@@ -222,6 +224,7 @@
 
 data EventState n = ES { esScrollRequests :: [(n, ScrollRequest)]
                        , cacheInvalidateRequests :: S.Set 
(CacheInvalidateRequest n)
+                       , requestedVisibleNames :: S.Set n
                        }
 
 -- | An extent of a named area: its size, location, and origin.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Types/TH.hs 
new/brick-0.67/src/Brick/Types/TH.hs
--- old/brick-0.65/src/Brick/Types/TH.hs        2001-09-09 03:46:40.000000000 
+0200
+++ new/brick-0.67/src/Brick/Types/TH.hs        2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,6 @@
 module Brick.Types.TH
   ( suffixLenses
+  , suffixLensesWith
   )
 where
 
@@ -7,7 +8,7 @@
 import qualified Language.Haskell.TH.Lib as TH
 
 import Lens.Micro ((&), (.~))
-import Lens.Micro.TH (DefName(..), makeLensesWith, lensRules, lensField)
+import Lens.Micro.TH (DefName(..), LensRules, makeLensesWith, lensRules, 
lensField)
 
 -- | A template haskell function to build lenses for a record type. This
 -- function differs from the 'Control.Lens.makeLenses' function in that
@@ -15,5 +16,10 @@
 -- and it adds an "L" suffix to lens names to make it clear that they
 -- are lenses.
 suffixLenses :: TH.Name -> TH.DecsQ
-suffixLenses = makeLensesWith $
-  lensRules & lensField .~ (\_ _ name -> [TopName $ TH.mkName $ TH.nameBase 
name ++ "L"])
+suffixLenses = suffixLensesWith "L" lensRules
+
+-- | A more general version of 'suffixLenses' that allows customization
+-- of the lens-building rules and allows customization of the suffix.
+suffixLensesWith :: String -> LensRules -> TH.Name -> TH.DecsQ
+suffixLensesWith suffix rs = makeLensesWith $
+    rs & lensField .~ (\_ _ name -> [TopName $ TH.mkName $ TH.nameBase name ++ 
suffix])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Types.hs 
new/brick-0.67/src/Brick/Types.hs
--- old/brick-0.65/src/Brick/Types.hs   2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick/Types.hs   2001-09-09 03:46:40.000000000 +0200
@@ -72,6 +72,7 @@
 
   -- * Making lenses
   , suffixLenses
+  , suffixLensesWith
 
   -- * Dynamic borders
   , bordersL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Widgets/Core.hs 
new/brick-0.67/src/Brick/Widgets/Core.hs
--- old/brick-0.65/src/Brick/Widgets/Core.hs    2001-09-09 03:46:40.000000000 
+0200
+++ new/brick-0.67/src/Brick/Widgets/Core.hs    2001-09-09 03:46:40.000000000 
+0200
@@ -225,7 +225,13 @@
 
 -- | Render the specified widget and record its rendering extent using
 -- the specified name (see also 'lookupExtent').
-reportExtent :: n -> Widget n -> Widget n
+--
+-- This function is the counterpart to 'makeVisible'; any visibility
+-- requests made with 'makeVisible' must have a corresponding
+-- 'reportExtent' in order to work. The 'clickable' function will also
+-- work for this purpose to tell the renderer about the clickable
+-- region.
+reportExtent :: (Ord n) => n -> Widget n -> Widget n
 reportExtent n p =
     Widget (hSize p) (vSize p) $ do
         result <- render p
@@ -233,10 +239,21 @@
             sz = ( result^.imageL.to V.imageWidth
                  , result^.imageL.to V.imageHeight
                  )
-        return $ result & extentsL %~ (ext:)
+        -- If the reported extent also has a visibility request
+        -- from EventM via makeVisible, add a visibility request to
+        -- the render state so this gets scrolled into view by any
+        -- containing viewport.
+        vReqs <- use requestedVisibleNames_L
+        let addVisReq = if sz^._1 > 0 && sz^._2 > 0 && n `S.member` vReqs
+                        then visibilityRequestsL %~ (VR (Location (0, 0)) sz :)
+                        else id
+        return $ addVisReq $ result & extentsL %~ (ext:)
 
 -- | Request mouse click events on the specified widget.
-clickable :: n -> Widget n -> Widget n
+--
+-- Regions used with 'clickable' can be scrolled into view with
+-- 'makeVisible'.
+clickable :: (Ord n) => n -> Widget n -> Widget n
 clickable n p =
     Widget (hSize p) (vSize p) $ do
         clickableNamesL %= (n:)
@@ -1053,7 +1070,7 @@
             Nothing  -> do
                 wResult <- render w
                 clickables <- renderedClickables wResult
-                cacheUpdate n (clickables, wResult)
+                cacheUpdate n (clickables, wResult & visibilityRequestsL .~ 
mempty)
                 return wResult
     where
         -- Given the rendered result of a Widget, collect the list of 
"clickable" names
@@ -1191,6 +1208,11 @@
 -- used to display large contents for scrolling. This function is best
 -- used when the contents are not too large OR when the contents are
 -- large and render-cacheable.
+--
+-- Also, be aware that there is a rich API for accessing viewport
+-- information from within the 'EventM' monad; check the docs for
+-- @Brick.Main@ to learn more about ways to get information about
+-- viewports after they're drawn.
 viewport :: (Ord n, Show n)
          => n
          -- ^ The name of the viewport (must be unique and stable for
@@ -1233,7 +1255,9 @@
 
       -- Update the viewport size.
       let newVp = VP 0 0 newSize (0, 0)
-          newSize = (c^.availWidthL - vSBWidth, c^.availHeightL - hSBHeight)
+          newSize = (newWidth, newHeight)
+          newWidth = c^.availWidthL - vSBWidth
+          newHeight = c^.availHeightL - hSBHeight
           vSBWidth = maybe 0 (const 1) vsOrientation
           hSBHeight = maybe 0 (const 1) hsOrientation
           doInsert (Just vp) = Just $ vp & vpSize .~ newSize
@@ -1244,10 +1268,12 @@
       -- Then render the viewport content widget with the rendering
       -- layout constraint released (but raise an exception if we are
       -- asked to render an infinitely-sized widget in the viewport's
-      -- scrolling dimension)
+      -- scrolling dimension). Also note that for viewports that
+      -- only scroll in one direction, we apply a constraint in the
+      -- non-scrolling direction in case a scroll bar is present.
       let release = case typ of
-            Vertical -> vRelease
-            Horizontal -> hRelease
+            Vertical -> vRelease . hLimit newWidth
+            Horizontal -> hRelease . vLimit newHeight
             Both -> vRelease >=> hRelease
           released = case release p of
             Just w -> w
@@ -1370,7 +1396,6 @@
                                   & extentsL .~ mempty
           _ -> render $ addVScrollbar
                       $ addHScrollbar
-                      $ cropToContext
                       $ vLimit (vpFinal^.vpSize._2)
                       $ hLimit (vpFinal^.vpSize._1)
                       $ padBottom Max
@@ -1392,7 +1417,8 @@
 scrollbarHandleAttr :: AttrName
 scrollbarHandleAttr = scrollbarAttr <> "handle"
 
-maybeClick :: n
+maybeClick :: (Ord n)
+           => n
            -> Maybe (ClickableScrollbarElement -> n -> n)
            -> ClickableScrollbarElement
            -> Widget n
@@ -1408,7 +1434,8 @@
 -- @withVScrollBarRenderer@. This is exposed so that if you want to
 -- render a scroll bar of your own, you can do so outside the @viewport@
 -- context.
-verticalScrollbar :: ScrollbarRenderer n
+verticalScrollbar :: (Ord n)
+                  => ScrollbarRenderer n
                   -- ^ The renderer to use.
                   -> n
                   -- ^ The viewport name associated with this scroll
@@ -1434,7 +1461,8 @@
            hLimit 1 $ withDefAttr scrollbarHandleAttr $ 
renderScrollbarHandleAfter vsRenderer
          ]
 
-verticalScrollbar' :: ScrollbarRenderer n
+verticalScrollbar' :: (Ord n)
+                   => ScrollbarRenderer n
                    -- ^ The renderer to use.
                    -> n
                    -- ^ The viewport name associated with this scroll
@@ -1504,7 +1532,8 @@
 -- @withHScrollBarRenderer@. This is exposed so that if you want to
 -- render a scroll bar of your own, you can do so outside the @viewport@
 -- context.
-horizontalScrollbar :: ScrollbarRenderer n
+horizontalScrollbar :: (Ord n)
+                    => ScrollbarRenderer n
                     -- ^ The renderer to use.
                     -> n
                     -- ^ The viewport name associated with this scroll
@@ -1531,7 +1560,8 @@
            vLimit 1 $ withDefAttr scrollbarHandleAttr $ 
renderScrollbarHandleAfter hsRenderer
          ]
 
-horizontalScrollbar' :: ScrollbarRenderer n
+horizontalScrollbar' :: (Ord n)
+                     => ScrollbarRenderer n
                      -- ^ The renderer to use.
                      -> n
                      -- ^ The viewport name associated with this scroll
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick/Widgets/FileBrowser.hs 
new/brick-0.67/src/Brick/Widgets/FileBrowser.hs
--- old/brick-0.65/src/Brick/Widgets/FileBrowser.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick/Widgets/FileBrowser.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -111,7 +111,6 @@
   , fileExtensionMatch
 
   -- * Lenses
-  , fileBrowserEntryFilterL
   , fileBrowserSelectableL
   , fileInfoFilenameL
   , fileInfoSanitizedFilenameL
@@ -121,6 +120,17 @@
   , fileStatusSizeL
   , fileStatusFileTypeL
 
+  -- * Getters
+  , fileBrowserEntryFilterG
+  , fileBrowserWorkingDirectoryG
+  , fileBrowserEntriesG
+  , fileBrowserLatestResultsG
+  , fileBrowserSelectedFilesG
+  , fileBrowserNameG
+  , fileBrowserSearchStringG
+  , fileBrowserExceptionG
+  , fileBrowserSelectableG
+
   -- * Miscellaneous
   , prettyFileSize
 
@@ -145,6 +155,7 @@
 import qualified Data.Set as Set
 import qualified Data.Vector as V
 import Lens.Micro
+import Lens.Micro.TH (lensRules, generateUpdateableOptics)
 import qualified Graphics.Vty as Vty
 import qualified System.Directory as D
 import qualified System.Posix.Files as U
@@ -238,6 +249,7 @@
     deriving (Read, Show, Eq)
 
 suffixLenses ''FileBrowser
+suffixLensesWith "G" (lensRules & generateUpdateableOptics .~ False) 
''FileBrowser
 suffixLenses ''FileInfo
 suffixLenses ''FileStatus
 
@@ -311,6 +323,12 @@
 -- indicates no filtering, meaning all entries will be shown. 'Just'
 -- indicates a function that should return 'True' for entries that
 -- should be permitted to appear.
+--
+-- Note that this applies the filter after setting it by updating the
+-- listed entries to reflect the result of the filter. That is unlike
+-- setting the filter with the 'fileBrowserEntryFilterL' lens directly,
+-- which just sets the filter but does not (and cannot) update the
+-- listed entries.
 setFileBrowserEntryFilter :: Maybe (FileInfo -> Bool) -> FileBrowser n -> 
FileBrowser n
 setFileBrowserEntryFilter f b =
     applyFilterAndSearch $ b & fileBrowserEntryFilterL .~ f
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/brick-0.65/src/Brick.hs new/brick-0.67/src/Brick.hs
--- old/brick-0.65/src/Brick.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/brick-0.67/src/Brick.hs 2001-09-09 03:46:40.000000000 +0200
@@ -1,8 +1,11 @@
 -- | This module is provided as a convenience to import the most
--- important parts of the API all at once. Note that the Haddock
--- documentation for this library is for /reference/ usage; if you
--- are looking for an introduction or tutorial, see the README for links
--- to plenty of material!
+-- important parts of the API all at once. If you are new to Brick and
+-- are looking to learn it, the best place to start is the
+-- [Brick User 
Guide](https://github.com/jtdaugherty/brick/blob/master/docs/guide.rst).
+-- The README also has links to other learning resources. Unlike
+-- most Haskell libraries that only have API documentation, Brick
+-- is best larned by reading the User Guide and other materials and
+-- referring to the API docs only as needed. Enjoy!
 module Brick
   ( module Brick.Main
   , module Brick.Types

Reply via email to