withCurrentDirectory :: FilePath -> IO a -> IO a
withCurrentDirectory dir action = bracket
  (getCurrentDirectory <* setCurrentDirectory dir)
  setCurrentDirectory
  (const action)
withCurrentDirectory :: FilePath -> IO a -> IO a
withCurrentDirectory dir action = bracket
  (getCurrentDirectory <* setCurrentDirectory dir)
  setCurrentDirectory
  (const action)
withCurrentDirectory dir action = bracket
  (getCurrentDirectory <* setCurrentDirectory dir)
  setCurrentDirectory
  (const action)