[commit: ghc] wip/nfs-locking: Replace isSlash with standard isPathSeparator. (212e91f)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:46:19 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/212e91f1a18f71e467ca68e929294b943c2cf171/ghc

>---------------------------------------------------------------

commit 212e91f1a18f71e467ca68e929294b943c2cf171
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Dec 31 03:50:59 2014 +0000

    Replace isSlash with standard isPathSeparator.


>---------------------------------------------------------------

212e91f1a18f71e467ca68e929294b943c2cf171
 src/Util.hs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/Util.hs b/src/Util.hs
index 846f547..af23f27 100644
--- a/src/Util.hs
+++ b/src/Util.hs
@@ -1,6 +1,5 @@
 module Util (
     module Data.Char,
-    isSlash,
     replaceIf, replaceEq,
     postProcessPackageData
     ) where
@@ -8,9 +7,6 @@ module Util (
 import Base
 import Data.Char
 
-isSlash :: Char -> Bool
-isSlash = (`elem` ['/', '\\']) 
-
 replaceIf :: (a -> Bool) -> a -> [a] -> [a]
 replaceIf p to = map (\from -> if p from then to else from) 
 
@@ -25,6 +21,6 @@ postProcessPackageData file = do
     pkgData <- (filter ('$' `notElem`) . lines) <$> liftIO (readFile file)
     length pkgData `seq` writeFileLines file $ map processLine pkgData
       where
-        processLine line = replaceIf isSlash '_' prefix ++ suffix
+        processLine line = replaceIf isPathSeparator '_' prefix ++ suffix
           where
             (prefix, suffix) = break (== '=') line



More information about the ghc-commits mailing list