remove unused isSymLink
authorJoey Hess <joeyh@joeyh.name>
Wed, 2 Sep 2020 18:59:35 +0000 (14:59 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 2 Sep 2020 18:59:35 +0000 (14:59 -0400)
That made Utility.FileMode depend on unix, but Utility.Tmp now depends
on it, and is used by Setup, which does not. So it was easiest to remove
this, especially since it's not used.

Utility/FileMode.hs

index 7d36c554a5d91d770fa60d8d74fed4b81522b226..a2fd1702ec90a9a01141196a70ec7501f646ddc5 100644 (file)
@@ -1,6 +1,6 @@
 {- File mode utilities.
  -
- - Copyright 2010-2017 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2020 Joey Hess <id@joeyh.name>
  -
  - License: BSD-2-clause
  -}
@@ -16,11 +16,7 @@ import System.IO
 import Control.Monad
 import System.PosixCompat.Types
 import System.PosixCompat.Files
-#ifndef mingw32_HOST_OS
-import System.Posix.Files (symbolicLinkMode)
-import Control.Monad.IO.Class (liftIO)
-#endif
-import Control.Monad.IO.Class (MonadIO)
+import Control.Monad.IO.Class
 import Foreign (complement)
 import Control.Monad.Catch
 
@@ -97,14 +93,6 @@ groupWriteRead f = modifyFileMode f $ addModes groupSharedModes
 checkMode :: FileMode -> FileMode -> Bool
 checkMode checkfor mode = checkfor `intersectFileModes` mode == checkfor
 
-{- Checks if a file mode indicates it's a symlink. -}
-isSymLink :: FileMode -> Bool
-#ifdef mingw32_HOST_OS
-isSymLink _ = False
-#else
-isSymLink = checkMode symbolicLinkMode
-#endif
-
 {- Checks if a file has any executable bits set. -}
 isExecutable :: FileMode -> Bool
 isExecutable mode = combineModes executeModes `intersectFileModes` mode /= 0