diff options
| author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-12 20:04:05 +0200 | 
|---|---|---|
| committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-12 20:04:05 +0200 | 
| commit | f5bbeb3242ea5dc0a471abb557dabc726ffe8877 (patch) | |
| tree | eb3df15360a72b4b0fb02d633194c63fe708b2c4 | |
| parent | e85b0920a06ad019754e1cb8e72eb6cc34cdeedc (diff) | |
| download | xmobar-f5bbeb3242ea5dc0a471abb557dabc726ffe8877.tar.gz xmobar-f5bbeb3242ea5dc0a471abb557dabc726ffe8877.tar.bz2  | |
credits to Claus Reinke and removed debugging code
darcs-hash:20070712180405-d6583-f02e36e3d0495316ae2672c04397e915bfff7c33.gz
| -rw-r--r-- | Runnable.hs | 30 | 
1 files changed, 19 insertions, 11 deletions
diff --git a/Runnable.hs b/Runnable.hs index 90e01af..9191697 100644 --- a/Runnable.hs +++ b/Runnable.hs @@ -1,4 +1,23 @@  {-# OPTIONS -fglasgow-exts #-} +----------------------------------------------------------------------------- +-- | +-- Module      :  XMobar.Runnable +-- Copyright   :  (c) Andrea Rossato +-- License     :  BSD-style (see LICENSE) +--  +-- Maintainer  :  Andrea Rossato <andrea.rossato@unibz.it> +-- Stability   :  unstable +-- Portability :  unportable +-- +-- The existential type to store the list of commands to be executed. +-- I must thank Claus Reinke for the help in understanding the mysteries of +-- reading existential types. The Read instance of Runnable must be credited to  +-- him. See here: +-- http:\/\/www.haskell.org\/pipermail\/haskell-cafe\/2007-July\/028227.html +-- +----------------------------------------------------------------------------- + +  module Runnable where  import Control.Monad @@ -37,14 +56,3 @@ readRunnable :: ReadPrec Runnable  readRunnable = prec 10 $ do                   Ident "Run" <- lexP                   parens $ readAsAnyOf runnableTypes - - --- | Reads the configuration files or quits with an error -readConfig :: FilePath -> IO Runnable -readConfig f =  -    do s <- readFile f -       case reads s of -         [(config,_)] -> return config -         [] -> error ("Corrupt config file: " ++ f) -         _ -> error ("Some problem occured. Aborting...") -  | 
