filepather 0.5.3 → 0.5.4
raw patch · 6 files changed
+70/−1 lines, 6 filesdep +exitcodePVP ok
version bump matches the API change (PVP)
Dependencies added: exitcode
API changes (from Hackage documentation)
+ System.FilePath.FilePather.Process: callProcess :: Exception e => [String] -> ReadFilePathT e IO ()
+ System.FilePath.FilePather.Process: proc :: [String] -> ReadFilePath e CreateProcess
+ System.FilePath.FilePather.Process: readProcess :: Exception e => [String] -> String -> ReadFilePathT e IO String
+ System.FilePath.FilePather.Process: readProcessWithExitCode :: [String] -> String -> ReadFilePathT e (ExitcodeT IO (String, String)) (String, String)
+ System.FilePath.FilePather.Process: showCommandForUser :: [String] -> ReadFilePath e String
+ System.FilePath.FilePather.Process: spawnProcess :: Exception e => [String] -> ReadFilePathT e IO ProcessHandle
+ System.FilePath.FilePather.ReadFilePath: type ReadFilePath e a = ReadFilePathT e Identity a
+ System.FilePath.FilePather.ReadFilePaths: type ReadFilePaths e a = ReadFilePathsT e Identity a
Files
- changelog.md +4/−0
- filepather.cabal +3/−1
- src/System/FilePath/FilePather.hs +1/−0
- src/System/FilePath/FilePather/Process.hs +60/−0
- src/System/FilePath/FilePather/ReadFilePath.hs +1/−0
- src/System/FilePath/FilePather/ReadFilePaths.hs +1/−0
changelog.md view
@@ -1,3 +1,7 @@+0.5.4++* add `Process` module+ 0.5.3 * Re-export some `System.Directory` functions as `ReadFilePathT`
filepather.cabal view
@@ -1,5 +1,5 @@ name: filepather-version: 0.5.3+version: 0.5.4 synopsis: Functions on System.FilePath description: Functions over @System.FilePath@ including a find function for recursing down directories.@@ -28,6 +28,7 @@ System.FilePath.FilePather.Find System.FilePath.FilePather.IO System.FilePath.FilePather.Posix+ System.FilePath.FilePather.Process System.FilePath.FilePather.ReadFilePath System.FilePath.FilePather.ReadFilePaths @@ -36,6 +37,7 @@ , containers >= 0.6.4.1 && < 0.7 , contravariant >= 1.5.5 && < 2 , directory >= 1.3.7.1 && < 2+ , exitcode >= 0.1.0.7 && < 2 , filepath >= 1.4.2.1 && < 2 , lens >= 5.2.3 && < 6 , mmorph >= 1.2.0 && < 2
src/System/FilePath/FilePather.hs view
@@ -7,5 +7,6 @@ import System.FilePath.FilePather.Find as P import System.FilePath.FilePather.IO as P import System.FilePath.FilePather.Posix as P+import System.FilePath.FilePather.Process as P import System.FilePath.FilePather.ReadFilePath as P import System.FilePath.FilePather.ReadFilePaths as P
+ src/System/FilePath/FilePather/Process.hs view
@@ -0,0 +1,60 @@+{-# OPTIONS_GHC -Wall #-}+{-# LANGUAGE NoImplicitPrelude #-}++module System.FilePath.FilePather.Process(+ spawnProcess+, showCommandForUser+, readProcess+, proc+, callProcess+, readProcessWithExitCode+) where++import Control.Exitcode as E+import Control.Exception+import Control.Monad.Reader.Class+import Control.Process( ProcessHandle, CreateProcess )+import qualified Control.Process as P+import System.FilePath.FilePather.ReadFilePath+import Prelude++spawnProcess ::+ Exception e =>+ [String]+ -> ReadFilePathT e IO ProcessHandle+spawnProcess x =+ tryReadFilePath (`P.spawnProcess` x)++showCommandForUser ::+ [String]+ -> ReadFilePath e String+showCommandForUser x =+ reader (`P.showCommandForUser` x)++readProcess ::+ Exception e =>+ [String]+ -> String+ -> ReadFilePathT e IO String+readProcess args i =+ tryReadFilePath (\p -> P.readProcess p args i)++proc ::+ [String]+ -> ReadFilePath e CreateProcess+proc s =+ reader (`P.proc` s)++callProcess ::+ Exception e =>+ [String]+ -> ReadFilePathT e IO ()+callProcess s =+ tryReadFilePath (`P.callProcess` s)++readProcessWithExitCode ::+ [String]+ -> String+ -> ReadFilePathT e (ExitcodeT IO (String, String)) (String, String)+readProcessWithExitCode as a =+ successReadFilePath (\p -> P.readProcessWithExitCode p as a)
src/System/FilePath/FilePather/ReadFilePath.hs view
@@ -7,6 +7,7 @@ module System.FilePath.FilePather.ReadFilePath( ReadFilePathT(..)+, ReadFilePath , ReadFilePathT1 , ReadFilePath1 , readFilePath
src/System/FilePath/FilePather/ReadFilePaths.hs view
@@ -7,6 +7,7 @@ module System.FilePath.FilePather.ReadFilePaths ( ReadFilePathsT+, ReadFilePaths , ReadFilePathsT1 , ReadFilePaths1 , readFilePaths1