From fa3e4365193857ecf78138d6e7aee55f38a61baa Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 14 May 2019 21:02:21 +0200 Subject: test5: move State to separate module --- test5.hs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'test5.hs') diff --git a/test5.hs b/test5.hs index aa61776..fc46495 100644 --- a/test5.hs +++ b/test5.hs @@ -35,6 +35,7 @@ import RenderTreeView (renderTreeView) import Scanner (scan,Scan(..)) import Screen import Safe +import State import System.Directory import System.Console.Docopt.NoTH (getArgWithDefault, parseArgsOrExit, parseUsageOrExit, shortOption) import System.Environment @@ -68,19 +69,6 @@ withForkWait async body = do restore (body wait) `onException` killThread tid -data State = State - { cursor :: Z.TreePos Z.Full TreeView - , xoffset :: Int - , yoffset :: Int - , flashMessage :: Blessings String - , screenWidth :: Int - , screenHeight :: Int - , headBuffer :: [Blessings String] - , treeBuffer :: [Blessings String] - , now :: UTCTime - , signalHandlers :: [(Signal, IO ())] - } - initState :: String -> IO State initState query = do r_ <- either error id <$> Notmuch.search -- cgit v1.2.3