summaryrefslogtreecommitdiffhomepage
path: root/Config.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2008-08-06 22:50:51 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2008-08-06 22:50:51 +0200
commitceab28dea35e65f60d9ec3ce62ed2bbb745d0bd8 (patch)
tree66dcf2bfbf9cc579a2c03e603d4eafbafae10fb3 /Config.hs
parent9816ff2e0dbb51dded121fb69768555d65f0421c (diff)
downloadxmobar-ceab28dea35e65f60d9ec3ce62ed2bbb745d0bd8.tar.gz
xmobar-ceab28dea35e65f60d9ec3ce62ed2bbb745d0bd8.tar.bz2
Use type operators to reduce ))))))) madness
darcs-hash:20080806205051-a5988-821eb4f6c182552af57f0d8972a04d9d7a06fac5.gz
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/Config.hs b/Config.hs
index 764b85c..05e6ac2 100644
--- a/Config.hs
+++ b/Config.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP, TypeOperators #-}
-----------------------------------------------------------------------------
-- |
@@ -75,17 +75,20 @@ defaultConfig =
, template = "%StdinReader% }{ <fc=#00FF00>%uname%</fc> * <fc=#FF0000>%theDate%</fc>"
}
+
+-- | An alias for tuple types that is more convenient for long lists.
+type a :*: b = (a, b)
+infixr :*:
+
-- | This is the list of types that can be hidden inside
-- 'Runnable.Runnable', the existential type that stores all commands
-- to be executed by Xmobar. It is used by 'Runnable.readRunnable' in
-- the 'Runnable.Runnable' Read instance. To install a plugin just add
--- the plugin's type to the list of types appearing in this function's type
--- signature.
-runnableTypes :: (Command,(Monitors,(Date,(PipeReader,(StdinReader,
+-- the plugin's type to the list of types (separated by ':*:') appearing in
+-- this function's type signature.
+runnableTypes :: Command :*: Monitors :*: Date :*: PipeReader :*: StdinReader :*:
#ifdef INOTIFY
- (Mail,())
-#else
- ()
+ Mail :*:
#endif
- )))))
+ ()
runnableTypes = undefined