-- | Convenience function for client libraries. Switch to a temporary
-- directory so that any files we create aren't visible. On Unix, this is
-- usually /tmp.
switchToTmpDir = void (try switchDir :: IO (Either SomeException ()))
  where 
    switchDir =
      getTemporaryDirectory  >>=
      setCurrentDirectory
switchToTmpDir = void (try switchDir :: IO (Either SomeException ()))
  where 
    switchDir =
      getTemporaryDirectory  >>=
      setCurrentDirectory
switchToTmpDir = void (try switchDir :: IO (Either SomeException ()))
  where 
    switchDir =
      getTemporaryDirectory  >>=
      setCurrentDirectory