From 4b73d3043896c2d759a60894bdfdadbc10d93bf4 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 29 Apr 2008 14:59:53 +0200 Subject: style, pointfree and trailing spaces darcs-hash:20080429125953-d6583-02a6653c15d3166ad264c45ec44082bdae30260e.gz --- Commands.hs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'Commands.hs') diff --git a/Commands.hs b/Commands.hs index 1be0677..5e03ad0 100644 --- a/Commands.hs +++ b/Commands.hs @@ -3,7 +3,7 @@ -- Module : Xmobar.Commands -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) --- +-- -- Maintainer : Andrea Rossato -- Stability : unstable -- Portability : unportable @@ -13,11 +13,15 @@ -- The 'Exec' class rappresents the executable types, whose constructors may -- appear in the 'Config.commands' field of the 'Config.Config' data type. -- --- The 'Command' data type is for OS commands to be run by Xmobar +-- The 'Command' data type is for OS commands to be run by xmobar -- ----------------------------------------------------------------------------- -module Commands where +module Commands + ( Command (..) + , Exec (..) + , tenthSeconds + ) where import Control.Concurrent import Data.Char @@ -54,12 +58,12 @@ instance Exec Command where where go = do (i,o,e,p) <- runInteractiveCommand (prog ++ concat (map (' ':) args)) exit <- waitForProcess p - let closeHandles = do + let closeHandles = do hClose o hClose i hClose e case exit of - ExitSuccess -> do + ExitSuccess -> do str <- hGetLine o closeHandles cb str -- cgit v1.2.3