doesDirectoryExist also accepts symbolic links

This closes #7971

Signed-off-by: Austin Seipp <austin@well-typed.com>
Make `-Wall` clean and use `{-# LANGUAGE #-}`

This commit adds a `{-# LANGUAGE #-}` declaration for non-Haskell2010
language extensions and refactors the code to become `-Wall` warning
free for GHC 7.4/7.6/HEAD.

As I can't test Windows compilation myself right now, I've left
`{-# OPTIONS_GHC -w #-}` guarded by an `#ifdef mingw32_HOST_OS`
for now.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Provide compatibility fallback for GHC 7.4.x

This also adds a documentation note w.r.t. `getModificationTime`
requiring `unix>=2.6.0.0` for providing sub-second resolution (from
which it can be inferred that on Windows support is missing for
sub-second resolution right now)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Refactor & update `directory.cabal` to `cabal-version>=1.10`

This also adds a Hackage-supported `changelog` file, bumps the package
version to 1.2.0.2, and lists the GHC versions this package has been
tested to compile with in the `tested-with` Cabal field.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Add `*~` and `dist/` to `.gitignore`
`M-x delete-trailing-whitespace`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
`setPermissions`: Wrap unchecked `stat(2)` in `throwErrnoIfMinus1_`

This affects a `mingw32_HOST_OS`-specific code section and caught my
attention when enabling `-Wall` in a MinGW build.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Make `mingw32_HOST_OS` `-Wall`-clean as well

This is a follow-up to ad35787a which cleans up compilation for
`mingw32_HOST_OS` builds.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>