Make tempdirs less annoying

This commit is contained in:
Daniel Gröber 2015-12-30 14:24:56 +01:00
parent cee8a29a54
commit 13632817a4

View File

@ -70,8 +70,8 @@ uniqTempDirName dir =
| otherwise = c
newTempDir :: FilePath -> IO FilePath
newTempDir dir =
flip createTempDirectory (uniqTempDirName dir) =<< getTemporaryDirectory
newTempDir _dir =
flip createTempDirectory "ghc-mod" =<< getTemporaryDirectory
whenM :: Monad m => m Bool -> m () -> m ()
whenM mb ma = mb >>= flip when ma