haskell/directory — pull request #8 by gintas (2014-11-03 21:42:12+00:00)
Title: renameFile now consistently reports an error if the destination is a directory

I only tested on Windows, could you please run the tests on Unix to make sure they are not broken?

https://ghc.haskell.org/trac/ghc/ticket/8482 is related.