packages feed

bhoogle 0.1.4.3 → 0.1.4.4

raw patch · 2 files changed

+33/−31 lines, 2 filesdep +versetdep −protoludedep ~brickdep ~bytestringdep ~containers

Dependencies added: verset

Dependencies removed: protolude

Dependency ranges changed: brick, bytestring, containers, directory, filepath, hoogle, lens, process, text, time, typed-process, vector, vty, vty-crossplatform

Files

app/Main.hs view
@@ -5,7 +5,7 @@  module Main where -import           Protolude+import           Verset -- replacing protolude until it works with GHC 9.12+ import           Control.Lens ((^.), (.~), (%~)) import           Control.Lens.TH (makeLenses) import qualified Data.Map as Map@@ -154,7 +154,7 @@         (K.KEsc, []) -> B.halt          _ -> do-          st' <- get+          st' <- B.get           -- How to interpret the key press depends on which control is focused           case BF.focusGetCurrent $ st' ^. stFocus of             Just TypeSearch ->@@ -162,14 +162,14 @@                 K.KChar '\t' -> do                   -- Search, clear sort order, focus next                   found <- liftIO $ doSearch st'-                  modify $ \st -> filterResults $ st & stFocus %~ BF.focusNext+                  B.modify $ \st -> filterResults $ st & stFocus %~ BF.focusNext                                                   & stResults .~ found                                                   & stSortResults .~ SortNone                  K.KBackTab ->do                   -- Search, clear sort order, focus prev                   found <- liftIO $ doSearch st'-                  modify $ \st -> filterResults $ st & stFocus %~ BF.focusPrev+                  B.modify $ \st -> filterResults $ st & stFocus %~ BF.focusPrev                                                    & stResults .~ found                                                    & stSortResults .~ SortNone @@ -177,7 +177,7 @@                   -- Search, clear sort order, focus on results                   --  This makes it faster if you want to search and navigate results without tabing through the text search box                   found <- liftIO $ doSearch st'-                  modify $ \st -> filterResults $ st & stResults .~ found+                  B.modify $ \st -> filterResults $ st & stResults .~ found                                                   & stSortResults .~ SortNone                                                   & stFocus %~ BF.focusNext & stFocus %~ BF.focusNext                                                   -- TODO with brick >= 0.33, rather than 2x focus next: & stFocus %~ BF.focusSetCurrent ListResults@@ -185,30 +185,30 @@                 _ -> do                   -- Let the editor handle all other events                   B.zoom stEditType $ BE.handleEditorEvent ev-                  st <- get+                  st <- B.get                   st2 <- liftIO $ searchAhead doSearch st-                  put st2+                  B.put st2               Just TextSearch ->               case k of-                K.KChar '\t' -> modify $ \st -> st & stFocus %~ BF.focusNext -- Focus next-                K.KBackTab -> modify $ \st -> st & stFocus %~ BF.focusPrev   -- Focus previous+                K.KChar '\t' -> B.modify $ \st -> st & stFocus %~ BF.focusNext -- Focus next+                K.KBackTab -> B.modify $ \st -> st & stFocus %~ BF.focusPrev   -- Focus previous                 _ -> do                   -- Let the editor handle all other events                   B.zoom stEditText $ BE.handleEditorEvent ev-                  modify filterResults+                  B.modify filterResults               Just ListResults ->               case k of-                K.KChar '\t' -> modify $ \st -> st & stFocus %~ BF.focusNext -- Focus next-                K.KBackTab -> modify $ \st -> st & stFocus %~ BF.focusPrev   -- Focus previous+                K.KChar '\t' -> B.modify $ \st -> st & stFocus %~ BF.focusNext -- Focus next+                K.KBackTab -> B.modify $ \st -> st & stFocus %~ BF.focusPrev   -- Focus previous                 K.KChar 's' ->                   -- Toggle the search order between ascending and descending, use asc if sort order was 'none'                   let sortDir = if (st' ^. stSortResults) == SortAsc then SortDec else SortAsc in                   let sorter = if sortDir == SortDec then Lst.sortBy (flip compareType) else Lst.sortBy compareType in-                  modify $ \st -> filterResults $ st & stResults %~ sorter+                  B.modify $ \st -> filterResults $ st & stResults %~ sorter                                                      & stSortResults .~ sortDir                 K.KChar 'p' -> do                   let selected = BL.listSelectedElement $ st' ^. stResultsList@@ -226,7 +226,7 @@      (B.AppEvent (EventUpdateTime time)) ->       -- Update the time in the state-      modify $ \st -> st & stTime .~ time+      B.modify $ \st -> st & stTime .~ time      _ -> pass 
bhoogle.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                bhoogle-version:             0.1.4.3+version:             0.1.4.4 synopsis:            Simple terminal GUI for local hoogle. description:         bhoogle is a terminal GUI layer over local hoogle. It provides search ahead and sub-string filtering in addition to the usual type-search. homepage:            https://github.com/andrevdm/bhoogle#readme@@ -8,7 +8,7 @@ license-file:        LICENSE author:              Andre Van Der Merwe maintainer:          andre@andrevdm.com-copyright:           2018-2024 Andre Van Der Merwe+copyright:           2018-2025 Andre Van Der Merwe category:            Development, Terminal build-type:          Simple extra-source-files:  README.md@@ -18,23 +18,25 @@   main-is:             Main.hs   ghc-options:         -threaded -rtsopts -with-rtsopts=-N -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wimplicit-prelude   build-depends:       base >= 4.9.1.0 && <5-                     , protolude-                     , text-                     , bytestring-                     , directory-                     , filepath-                     , containers-                     , brick >= 2.1-                     , vty >= 6.0-                     , vty-crossplatform-                     , vector-                     , process-                     , lens-                     , time-                     , hoogle-                     , typed-process+                     , verset >= 0.0.1 && < 0.1+                     --protolude+                     , brick >= 2.1 && < 2.9+                     , bytestring >= 0.12.1 && < 0.13+                     , containers >= 0.6 && < 0.8+                     , directory >= 1.3.8 && < 1.4+                     , filepath >= 1.4 && < 1.6+                     , hoogle >= 5.0 && < 5.1+                     , lens >= 5.3.4 && < 5.4+                     , process >= 1.6.2 && < 1.7+                     , text >= 2.1.1 && < 2.2+                     , time >= 1.12.2 && < 1.15+                     , typed-process >= 0.2.12 && < 0.3+                     , vector >= 0.13.2 && < 0.14+                     , vty >= 6.2 && < 6.5+                     , vty-crossplatform >= 0.4.0 && < 0.5   default-language:    Haskell2010  source-repository head   type:     git   location: https://github.com/andrevdm/bhoogle+