* Fixed Haddock comment. Please: Before committing, everybody should test with
"make html" if the documentation is syntactically OK. It is quite frustrating
to find a broken RPM build after several hours and 99% of the work done...
>:-(
* Fixed isPathSeparator comment.
* Cleanup
-- * Separators
--------------------------------------------------------------
-- * Separators
--------------------------------------------------------------
--- | Checks whether the character is a valid path separator for the host platform.
--- The valid character is a 'pathSeparator' but since the Windows operating system
--- also accepts a backslash (\"\\\") the function also checks for \"\/\" on this platform.
+-- | Checks whether the character is a valid path separator for the host
+-- platform. The valid character is a 'pathSeparator' but since the Windows
+-- operating system also accepts a slash (\"\/\") since DOS 2, the function
+-- checks for it on this platform, too.
isPathSeparator :: Char -> Bool
isPathSeparator :: Char -> Bool
- ch == '/' || ch == '\\'
+isPathSeparator ch = ch == '/' || ch == '\\'
+isPathSeparator ch = ch == '/'
--- | Provides a platform-specific character used to separate directory levels in a
--- path string that reflects a hierarchical file system organization.
--- The separator is a slash (\"\/\") on Unix and Macintosh, and a backslash (\"\\\") on the
--- Windows operating system.
+-- | Provides a platform-specific character used to separate directory levels in
+-- a path string that reflects a hierarchical file system organization. The
+-- separator is a slash (@\"\/\"@) on Unix and Macintosh, and a backslash
+-- (@\"\\\"@) on the Windows operating system.
pathSeparator :: Char
#ifdef mingw32_TARGET_OS
pathSeparator = '\\'
pathSeparator :: Char
#ifdef mingw32_TARGET_OS
pathSeparator = '\\'
pathSeparator = '/'
#endif
pathSeparator = '/'
#endif
--- | A platform-specific character used to separate search path strings in
--- environment variables. The separator is a colon (\":\") on Unix and Macintosh,
--- and a semicolon (\";\") on the Windows operating system.
+-- | A platform-specific character used to separate search path strings in
+-- environment variables. The separator is a colon (@\":\"@) on Unix and
+-- Macintosh, and a semicolon (@\";\"@) on the Windows operating system.
searchPathSeparator :: Char
#ifdef mingw32_TARGET_OS
searchPathSeparator = ';'
searchPathSeparator :: Char
#ifdef mingw32_TARGET_OS
searchPathSeparator = ';'
-- ToDo: This should be determined via autoconf (AC_EXEEXT)
-- | Extension for executable files
-- ToDo: This should be determined via autoconf (AC_EXEEXT)
-- | Extension for executable files
--- (typically @""@ on Unix and @".exe"@ on Windows or OS/2)
+-- (typically @\"\"@ on Unix and @\".exe\"@ on Windows or OS\/2)
+#ifdef mingw32_TARGET_OS
+exeExtension = ".exe"
+#else
+exeExtension = ""
+#endif
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files
--- (typically @".o"@ on Unix and @".obj"@ on Windows)
+-- (typically @\".o\"@ on Unix and @\".obj\"@ on Windows)
+#ifdef mingw32_TARGET_OS
+objExtension = ".obj"
+#else
+objExtension = ".o"
+#endif
-- | Extension for dynamically linked (or shared) libraries
-- | Extension for dynamically linked (or shared) libraries
--- (typically @".so"@ on Unix and @".dll"@ on Windows)
+-- (typically @\".so\"@ on Unix and @\".dll\"@ on Windows)
-exeExtension = ".exe"
-objExtension = ".obj"
dllExtension = ".dll"
#else
dllExtension = ".dll"
#else
-exeExtension = ""
-objExtension = ".o"
dllExtension = ".so"
#endif
dllExtension = ".so"
#endif