summaryrefslogtreecommitdiffhomepage
path: root/Plugins/PipeReader.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-27 19:51:44 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-27 19:51:44 +0200
commitb995a341484b2816ab91aaec15c98d54428bdd72 (patch)
tree5855c97d6687794bcada40ffd9fbf705965e07a3 /Plugins/PipeReader.hs
parent0c44da8e08919bef3e81b485a44ed68a1b9be350 (diff)
downloadxmobar-b995a341484b2816ab91aaec15c98d54428bdd72.tar.gz
xmobar-b995a341484b2816ab91aaec15c98d54428bdd72.tar.bz2
PipeReader: added a configurable alias
darcs-hash:20070927175144-d6583-60d4a2e8923f3e8aea785283a796d52007cde3c3.gz
Diffstat (limited to 'Plugins/PipeReader.hs')
-rw-r--r--Plugins/PipeReader.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Plugins/PipeReader.hs b/Plugins/PipeReader.hs
index 8fa2e8e..695f1e6 100644
--- a/Plugins/PipeReader.hs
+++ b/Plugins/PipeReader.hs
@@ -17,12 +17,12 @@ module Plugins.PipeReader where
import System.IO
import Plugins
-data PipeReader = PipeReader String
+data PipeReader = PipeReader String String
deriving (Read, Show)
instance Exec PipeReader where
- alias (PipeReader p) = p
- start (PipeReader p) cb = do
+ alias (PipeReader _ a) = a
+ start (PipeReader p _) cb = do
h <- openFile p ReadMode
forever (hGetLine h >>= cb)
where forever a = a >> forever a