From ceab28dea35e65f60d9ec3ce62ed2bbb745d0bd8 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 6 Aug 2008 22:50:51 +0200 Subject: Use type operators to reduce ))))))) madness darcs-hash:20080806205051-a5988-821eb4f6c182552af57f0d8972a04d9d7a06fac5.gz --- Config.hs | 19 +++++++++++-------- 1 file 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% }{ %uname% * %theDate%" } + +-- | 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 -- cgit v1.2.3