getConfig :: IO Config
getConfig = do
    home  <- getHomeDirectory
    confs <- filterM doesFileExist ["." ++ cgreprc, home </> "." ++ cgreprc, "/etc" </> cgreprc]
    if notNull confs then liftM dropComments (readFile (head confs)) >>= \xs ->
                            return (prettyRead xs "Config error" :: Config)
                    else return $ Config [] [] False
getConfig :: IO Config
getConfig = do
    home  <- getHomeDirectory
    confs <- filterM doesFileExist ["." ++ cgreprc, home </> "." ++ cgreprc, "/etc" </> cgreprc]
    if notNull confs then liftM dropComments (readFile (head confs)) >>= \xs ->
                            return (prettyRead xs "Config error" :: Config)
                    else return $ Config [] [] False
getConfig = do
    home  <- getHomeDirectory
    confs <- filterM doesFileExist ["." ++ cgreprc, home </> "." ++ cgreprc, "/etc" </> cgreprc]
    if notNull confs then liftM dropComments (readFile (head confs)) >>= \xs ->
                            return (prettyRead xs "Config error" :: Config)
                    else return $ Config [] [] False