summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Commands.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Commands.hs b/Commands.hs
index 9c6df7a..eaa0db1 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -28,7 +28,13 @@ import System.IO (hClose, hGetLine)
class Show e => Exec e where
alias :: e -> String
alias e = takeWhile (not . isSpace) $ show e
+ run :: e -> IO String
+ run _ = return ""
start :: e -> (String -> IO ()) -> IO ()
+ start e cb = go
+ where go = do
+ run e >>= cb
+ tenthSeconds 10 >> go
data Command = Com Program Args Alias Rate
deriving (Show,Read,Eq)