From 22ad130fa851909870ddc0e6caa1aa6f8d6a66a1 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Fri, 13 Jul 2007 14:37:07 +0200 Subject: haddock tuning darcs-hash:20070713123707-d6583-b236b40087a92c45511afb3e4350813917515c02.gz --- Commands.hs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'Commands.hs') diff --git a/Commands.hs b/Commands.hs index 6fcb343..1a80b80 100644 --- a/Commands.hs +++ b/Commands.hs @@ -8,7 +8,13 @@ -- Stability : unstable -- Portability : unportable -- --- A Command datatype for XMobar status bar for the Xmonad Window Manager +-- The 'Exec' class and the 'Command' data type. +-- +-- 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 stores the monitors to be run internally by +-- XMobar. -- ----------------------------------------------------------------------------- @@ -26,6 +32,11 @@ import Monitors.Swap import Monitors.Cpu import Monitors.Batt +class Exec e where + run :: e -> IO String + rate :: e -> Int + alias :: e -> String + data Command = Com Program Args Alias Rate | Weather Station Args Rate | Network Interface Args Rate @@ -42,11 +53,6 @@ type Station = String type Interface = String type Rate = Int -class Exec e where - run :: e -> IO String - rate :: e -> Int - alias :: e -> String - instance Exec Command where alias (Weather s _ _) = s alias (Network i _ _) = i -- cgit v1.2.3