packages feed

bhoogle 0.1.1.1 → 0.1.2.1

raw patch · 2 files changed

+19/−1 lines, 2 files

Files

app/Main.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE LambdaCase #-}  module Main where @@ -23,6 +24,7 @@ import           Control.Concurrent (threadDelay, forkIO) import qualified Graphics.Vty as V import qualified Graphics.Vty.Input.Events as K+import qualified System.Directory as Dir import qualified Hoogle as H  @@ -69,6 +71,21 @@  main :: IO () main = do+  dbPath <- H.defaultDatabaseLocation+  Dir.doesFileExist dbPath >>= \case+    True -> runBHoogle+    False -> do+      putText ""+      putText "bhoogle error: "+      putText "   default hoogle database not found"+      putText $ "     at " <> Txt.pack dbPath+      putText "   You can create the database by installing hoogle and running"+      putText "     hoogle generate"+      putText ""++ +runBHoogle :: IO ()+runBHoogle = do   chan <- BCh.newBChan 5 -- ^ create a bounded channel for events    -- Send a tick event every 1 seconds with the current time
bhoogle.cabal view
@@ -1,5 +1,5 @@ name:                bhoogle-version:             0.1.1.1+version:             0.1.2.1 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/githubuser/bhoogle#readme@@ -32,6 +32,7 @@                      , bytestring                      , time                      , hoogle+                     , directory   default-language:    Haskell2010  source-repository head