getConfig :: IO (Either String ByteString)
getConfig = do
  xdgF <- xdgConfig
  homeF <- homeConfig
  xdg <- doesFileExist xdgF
  home <- doesFileExist homeF
  case (xdg, home) of
    (True,_) -> Right <$> BS.readFile xdgF
    (_,True) -> Right <$> BS.readFile homeF
    (_,_)    -> return $ Left "no config file"
getConfig :: IO (Either String ByteString)
getConfig = do
  xdgF <- xdgConfig
  homeF <- homeConfig
  xdg <- doesFileExist xdgF
  home <- doesFileExist homeF
  case (xdg, home) of
    (True,_) -> Right <$> BS.readFile xdgF
    (_,True) -> Right <$> BS.readFile homeF
    (_,_)    -> return $ Left "no config file"
getConfig = do
  xdgF <- xdgConfig
  homeF <- homeConfig
  xdg <- doesFileExist xdgF
  home <- doesFileExist homeF
  case (xdg, home) of
    (True,_) -> Right <$> BS.readFile xdgF
    (_,True) -> Right <$> BS.readFile homeF
    (_,_)    -> return $ Left "no config file"