diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2015-05-27 22:09:20 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2015-05-27 22:09:20 -0400 |
commit | d95da762bdf5dacf01a2778e3f3ded2b4e464a49 (patch) | |
tree | 7966726633f963493b642f71bb4249d3dc1f2d96 /src/Main.hs | |
parent | 89f5c0e9471c871aa8c660ba17083f5e33baca09 (diff) |
Build warning-free
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 230cee2..6e7496b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -14,11 +14,13 @@ module Main (main) where +import Prelude hiding (lines, log) + import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.MSampleVar import Control.Monad (forever, void) import Data.Default.Class (def) -import Graphics.Vty (Vty, (<->), (<|>)) +import Graphics.Vty (Vty) import qualified Graphics.Vty as Vty main :: IO () @@ -43,7 +45,8 @@ jarvis terminal = do prompter :: MSampleVar Vty.Image -> MSampleVar () -> IO () prompter output redraw = prompt' 0 - where prompt' n = do + where prompt' :: Integer -> IO () + prompt' n = do writeSV output $ Vty.string def ("jarvis " ++ show n ++ " >") writeSV redraw () threadDelay 1000000 @@ -51,7 +54,8 @@ prompter output redraw = prompt' 0 logger :: MSampleVar Vty.Image -> MSampleVar () -> IO () logger output redraw = log 0 [] - where log n lines = do + where log :: Integer -> [String] -> IO () + log n lines = do let lines' = lines ++ ["<" ++ show n ++ ">"] writeSV output $ Vty.vertCat $ map (Vty.string def) lines' writeSV redraw () |