diff --git a/HsDirectoryConfig.h.in b/HsDirectoryConfig.h.in
--- a/HsDirectoryConfig.h.in
+++ b/HsDirectoryConfig.h.in
@@ -18,6 +18,9 @@
 /* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 
+/* Define to 1 if you have the `realpath' function. */
+#undef HAVE_REALPATH
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -26,5 +26,5 @@
 [bi]: https://github.com/haskell/directory/actions/workflows/build.yml/badge.svg
 [bl]: https://github.com/haskell/directory/actions
 [di]: https://img.shields.io/hackage-deps/v/directory.svg
-[dl]: http://packdeps.haskellers.com/feed?needle=directory
+[dl]: http://packdeps.haskellers.com/feed?needle=exact:directory
 [ac]: https://gnu.org/software/autoconf
diff --git a/System/Directory.hs b/System/Directory.hs
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -334,7 +334,7 @@
           -- createDirectory (and indeed POSIX mkdir) does not distinguish
           -- between a dir already existing and a file already existing. So we
           -- check for it here. Unfortunately there is a slight race condition
-          -- here, but we think it is benign. It could report an exeption in
+          -- here, but we think it is benign. It could report an exception in
           -- the case that the dir did exist but another process deletes the
           -- directory and creates a file in its place before we can check
           -- that the directory did indeed exist.
@@ -403,7 +403,7 @@
 --
 -- On Windows, the operation fails if /dir/ is a directory symbolic link.
 --
--- This operation is reported to be flaky on Windows so retry logic may 
+-- This operation is reported to be flaky on Windows so retry logic may
 -- be advisable. See: https://github.com/haskell/directory/pull/108
 removeDirectoryRecursive :: FilePath -> IO ()
 removeDirectoryRecursive path =
@@ -422,7 +422,7 @@
 -- /path/ together with its contents and subdirectories. Symbolic links are
 -- removed without affecting their the targets.
 --
--- This operation is reported to be flaky on Windows so retry logic may 
+-- This operation is reported to be flaky on Windows so retry logic may
 -- be advisable. See: https://github.com/haskell/directory/pull/108
 removePathRecursive :: FilePath -> IO ()
 removePathRecursive path =
@@ -437,7 +437,7 @@
 -- /dir/ recursively. Symbolic links are removed without affecting their the
 -- targets.
 --
--- This operation is reported to be flaky on Windows so retry logic may 
+-- This operation is reported to be flaky on Windows so retry logic may
 -- be advisable. See: https://github.com/haskell/directory/pull/108
 removeContentsRecursive :: FilePath -> IO ()
 removeContentsRecursive path =
@@ -985,7 +985,7 @@
 -- | Search for executable files in a list of system-defined locations, which
 -- generally includes @PATH@ and possibly more.
 --
--- On Windows, this /only returns the first ocurrence/, if any.  Its behavior
+-- On Windows, this /only returns the first occurrence/, if any.  Its behavior
 -- is therefore equivalent to 'findExecutable'.
 --
 -- On non-Windows platforms, the behavior is equivalent to
@@ -1055,7 +1055,7 @@
 
 -- | @findFilesWith predicate dirs name@ searches through the list of
 -- directories (@dirs@) for files that have the given @name@ and satisfy the
--- given @predicate@ ands return the paths of those files.  The directories
+-- given @predicate@ and returns the paths of those files.  The directories
 -- are checked in a left-to-right order and the paths are returned in the same
 -- order.
 --
@@ -1150,6 +1150,12 @@
 -- shared among all threads of the process.  Therefore, when performing
 -- filesystem operations from multiple threads, it is highly recommended to
 -- use absolute rather than relative paths (see: 'makeAbsolute').
+--
+-- Note that 'getCurrentDirectory' is not guaranteed to return the same path
+-- received by 'setCurrentDirectory'. On POSIX systems, the path returned will
+-- always be fully dereferenced (not contain any symbolic links). For more
+-- information, refer to the documentation of
+-- <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html getcwd>.
 --
 -- The operation may fail with:
 --
diff --git a/System/Directory/Internal.hs b/System/Directory/Internal.hs
--- a/System/Directory/Internal.hs
+++ b/System/Directory/Internal.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE CPP #-}
+{-# OPTIONS_HADDOCK not-home #-}
 -- |
 -- Stability: unstable
 -- Portability: unportable
diff --git a/System/Directory/Internal/Posix.hsc b/System/Directory/Internal/Posix.hsc
--- a/System/Directory/Internal/Posix.hsc
+++ b/System/Directory/Internal/Posix.hsc
@@ -49,7 +49,16 @@
 c_PATH_MAX = Nothing
 #endif
 
+#if !defined(HAVE_REALPATH)
+
+c_realpath :: CString -> CString -> IO CString
+c_realpath _ _ = throwIO (mkIOError UnsupportedOperation "platform does not support realpath" Nothing Nothing)
+
+#else
+
 foreign import ccall "realpath" c_realpath :: CString -> CString -> IO CString
+
+#endif
 
 withRealpath :: CString -> (CString -> IO a) -> IO a
 withRealpath path action = case c_PATH_MAX of
diff --git a/System/Directory/Internal/Prelude.hs b/System/Directory/Internal/Prelude.hs
--- a/System/Directory/Internal/Prelude.hs
+++ b/System/Directory/Internal/Prelude.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE CPP #-}
+{-# OPTIONS_HADDOCK hide #-}
 -- |
 -- Stability: unstable
 -- Portability: portable
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,12 @@
 Changelog for the [`directory`][1] package
 ==========================================
 
+## 1.3.7.1 (Jul 2022)
+
+  * Relax `time` version bounds to support 1.12.
+  * Relax `Win32` version bounds to support 2.13.
+  * Relax `base` version bounds to support 4.17.
+
 ## 1.3.7.0 (Sep 2021)
 
   * `getXdgDirectory` now supports `XdgState` (`XDG_STATE_HOME`).
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -3376,6 +3376,13 @@
 fi
 
 
+ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
+if test "x$ac_cv_func_realpath" = xyes
+then :
+  printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
+
+fi
+
 ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
 if test "x$ac_cv_func_utimensat" = xyes
 then :
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,7 @@
 # check for specific header (.h) files that we are interested in
 AC_CHECK_HEADERS([fcntl.h limits.h sys/types.h sys/stat.h time.h])
 
+AC_CHECK_FUNCS([realpath])
 AC_CHECK_FUNCS([utimensat])
 AC_CHECK_FUNCS([CreateSymbolicLinkW])
 AC_CHECK_FUNCS([GetFinalPathNameByHandleW])
diff --git a/directory.cabal b/directory.cabal
--- a/directory.cabal
+++ b/directory.cabal
@@ -1,5 +1,5 @@
 name:           directory
-version:        1.3.7.0
+version:        1.3.7.1
 license:        BSD3
 license-file:   LICENSE
 maintainer:     libraries@haskell.org
@@ -54,11 +54,11 @@
     include-dirs: .
 
     build-depends:
-        base     >= 4.5 && < 4.17,
-        time     >= 1.4 && < 1.12,
+        base     >= 4.5 && < 4.18,
+        time     >= 1.4 && < 1.13,
         filepath >= 1.3 && < 1.5
     if os(windows)
-        build-depends: Win32 >= 2.2.2 && < 2.13
+        build-depends: Win32 >= 2.2.2 && < 2.14
     else
         build-depends: unix >= 2.5.1 && < 2.9
 
@@ -100,6 +100,7 @@
         GetPermissions001
         LongPaths
         MakeAbsolute
+        MinimizeNameConflicts
         PathIsSymbolicLink
         RemoveDirectoryRecursive001
         RemovePathForcibly
diff --git a/tests/Main.hs b/tests/Main.hs
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -20,6 +20,7 @@
 import qualified GetPermissions001
 import qualified LongPaths
 import qualified MakeAbsolute
+import qualified MinimizeNameConflicts
 import qualified PathIsSymbolicLink
 import qualified RemoveDirectoryRecursive001
 import qualified RemovePathForcibly
@@ -54,6 +55,7 @@
   T.isolatedRun _t "GetPermissions001" GetPermissions001.main
   T.isolatedRun _t "LongPaths" LongPaths.main
   T.isolatedRun _t "MakeAbsolute" MakeAbsolute.main
+  T.isolatedRun _t "MinimizeNameConflicts" MinimizeNameConflicts.main
   T.isolatedRun _t "PathIsSymbolicLink" PathIsSymbolicLink.main
   T.isolatedRun _t "RemoveDirectoryRecursive001" RemoveDirectoryRecursive001.main
   T.isolatedRun _t "RemovePathForcibly" RemovePathForcibly.main
diff --git a/tests/MinimizeNameConflicts.hs b/tests/MinimizeNameConflicts.hs
new file mode 100644
--- /dev/null
+++ b/tests/MinimizeNameConflicts.hs
@@ -0,0 +1,34 @@
+{-# LANGUAGE CPP #-}
+module MinimizeNameConflicts
+  ( main
+  , module System.Directory
+#if defined(mingw32_HOST_OS)
+  , module System.Win32
+#else
+  , module System.Posix
+#endif
+  ) where
+#include "util.inl"
+#if defined(mingw32_HOST_OS)
+import System.Win32 hiding
+  ( copyFile
+  , createDirectory
+  , getCurrentDirectory
+  , getTemporaryDirectory
+  , removeDirectory
+  , setCurrentDirectory
+  )
+#else
+import System.Posix hiding
+  ( createDirectory
+  , isSymbolicLink
+  , removeDirectory
+  )
+#endif
+
+-- This is just a compile-test to check for name conflicts between directory
+-- and other boot libraries. See for example:
+-- https://github.com/haskell/directory/issues/52
+main :: TestEnv -> IO ()
+main _t = do
+  T(expect) "no-op" True
diff --git a/tests/util.inl b/tests/util.inl
--- a/tests/util.inl
+++ b/tests/util.inl
@@ -5,3 +5,5 @@
 import System.Directory
 import Util (TestEnv)
 import qualified Util as T
+-- This comment prevents "T" above from being treated as the function-like
+-- macro defined earlier.
