summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 1a26868..f170492 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -7,11 +7,8 @@ import Control.Monad
import Data.Char
import Data.IORef
import Data.List
-import Data.Time.Clock (getCurrentTime)
-import Data.Time.Format (formatTime)
import Numeric (showIntAtBase)
import System.IO
-import System.Locale (defaultTimeLocale, rfc822DateFormat)
--import System.Posix.Signals
import GHC.Stats (getGCStats)
@@ -46,7 +43,7 @@ main = do
let st = VTState
{ mode = InsertMode
- , buffer = ("", "")
+ , buffer = ("!while date; do sleep 1; done", "")
, processCount = 0
}
@@ -69,19 +66,9 @@ main = do
-- render initial input line
_withOutput $ return ()
- forkIO $ dateThread _withOutput 1000000
-
uiThread cf _putState _getState
-dateThread :: (IO () -> IO ()) -> Int -> IO ()
-dateThread _withOutput delay = forever $ do
- t <- liftIO getCurrentTime
- _withOutput $
- putStrLn $ formatTime defaultTimeLocale rfc822DateFormat t
- threadDelay delay
-
-
uiThread :: VTConfig -> (VTState -> IO ()) -> IO VTState -> IO ()
uiThread cf putState getState = forever $ do
q0 <- getState