Updated hledger-ui to use brick-0.16 (#479)
brick-0.16 uses Brick.BChan.BChan instead of Control.Concurrent.Chan.Chan.
This commit is contained in:
		
							parent
							
								
									8bc67d5ee8
								
							
						
					
					
						commit
						d3883bad1f
					
				| @ -3,6 +3,7 @@ hledger-ui - a hledger add-on providing a curses-style interface. | ||||
| Copyright (c) 2007-2015 Simon Michael <simon@joyful.com> | ||||
| Released under GPL version 3 or later. | ||||
| -} | ||||
| {-# LANGUAGE CPP #-} | ||||
| {-# LANGUAGE OverloadedStrings #-} | ||||
| {-# LANGUAGE TemplateHaskell #-} | ||||
| {-# LANGUAGE MultiParamTypeClasses #-} | ||||
| @ -11,7 +12,7 @@ module Hledger.UI.Main where | ||||
| 
 | ||||
| -- import Control.Applicative | ||||
| -- import Lens.Micro.Platform ((^.)) | ||||
| import Control.Concurrent | ||||
| import Control.Concurrent (threadDelay) | ||||
| import Control.Concurrent.Async | ||||
| import Control.Monad | ||||
| -- import Control.Monad.IO.Class (liftIO) | ||||
| @ -30,6 +31,12 @@ import System.FilePath | ||||
| import System.FSNotify | ||||
| import Brick | ||||
| 
 | ||||
| #if MIN_VERSION_brick(0,16,0) | ||||
| import qualified Brick.BChan as BC | ||||
| #else | ||||
| import Control.Concurrent.Chan (newChan, writeChan) | ||||
| #endif | ||||
| 
 | ||||
| import Hledger | ||||
| import Hledger.Cli hiding (progname,prognameandversion,green) | ||||
| import Hledger.UI.UIOptions | ||||
| @ -41,6 +48,15 @@ import Hledger.UI.RegisterScreen | ||||
| 
 | ||||
| ---------------------------------------------------------------------- | ||||
| 
 | ||||
| #if MIN_VERSION_brick(0,16,0) | ||||
| newChan :: IO (BC.BChan a) | ||||
| newChan = BC.newBChan 10 | ||||
| 
 | ||||
| writeChan :: BC.BChan a -> a -> IO () | ||||
| writeChan = BC.writeBChan | ||||
| #endif | ||||
| 
 | ||||
| 
 | ||||
| main :: IO () | ||||
| main = do | ||||
|   opts <- getHledgerUIOpts | ||||
|  | ||||
| @ -85,7 +85,7 @@ executable hledger-ui | ||||
|     buildable: False | ||||
|   else | ||||
|     build-depends: | ||||
|         brick >= 0.12 && < 0.16 | ||||
|         brick >= 0.12 && < 0.17 | ||||
|       , vty >= 5.5 && < 5.15 | ||||
|   if flag(threaded) | ||||
|     ghc-options: -threaded | ||||
|  | ||||
| @ -88,7 +88,7 @@ executables: | ||||
|           buildable: false | ||||
|         else: | ||||
|           dependencies: | ||||
|             - brick >= 0.12 && < 0.16 | ||||
|             - brick >= 0.12 && < 0.17 | ||||
|             - vty >= 5.5 && < 5.15 | ||||
|       - condition: flag(threaded) | ||||
|         ghc-options: -threaded | ||||
|  | ||||
| @ -11,7 +11,7 @@ packages: | ||||
| 
 | ||||
| extra-deps: | ||||
| # for hledger-ui: | ||||
| - brick-0.15.2 | ||||
| - brick-0.16 | ||||
| - vty-5.14 | ||||
| - text-zipper-0.8.1 | ||||
| # for hledger-web: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user