expose Control.Monad.join
I think I've been looking for that function for some time. Ie, I remember wanting to collapse Just Nothing to Nothing.
This commit is contained in:
parent
2a84deb271
commit
8a2d1988d3
19 changed files with 30 additions and 32 deletions
|
@ -32,7 +32,7 @@ setupLsof = do
|
|||
when (isAbsolute cmd) $ do
|
||||
path <- getSearchPath
|
||||
let path' = takeDirectory cmd : path
|
||||
setEnv "PATH" (join [searchPathSeparator] path') True
|
||||
setEnv "PATH" (intercalate [searchPathSeparator] path') True
|
||||
|
||||
{- Checks each of the files in a directory to find open files.
|
||||
- Note that this will find hard links to files elsewhere that are open. -}
|
||||
|
|
|
@ -22,7 +22,7 @@ rsyncShell command = [Param "-e", Param $ unwords $ map escape (toCommand comman
|
|||
{- rsync requires some weird, non-shell like quoting in
|
||||
- here. A doubled single quote inside the single quoted
|
||||
- string is a single quote. -}
|
||||
escape s = "'" ++ join "''" (split "'" s) ++ "'"
|
||||
escape s = "'" ++ intercalate "''" (split "'" s) ++ "'"
|
||||
|
||||
{- Runs rsync in server mode to send a file. -}
|
||||
rsyncServerSend :: [CommandParam] -> FilePath -> IO Bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue