-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | path alternatives to shake functions -- -- path alternatives to shake functions @package shake-path @version 0.0.0.0 module Development.Shake.Path getHashedShakeVersionP :: [Path r File] -> IO String needP :: [Path r File] -> Action () wantP :: [Path r File] -> Rules () ($%>) :: Path r File -> Action () -> Rules () ($&%>) :: [Path r File] -> Action () -> Rules () orderOnlyP :: [Path r File] -> Action () -- | Execute a system command. Before running cmd make sure you -- need any files that are used by the command. -- --
-- unit $ cmd "git log --pretty=" "oneline" -- git log --pretty= oneline
-- unit $ cmd "git log --pretty=" ["oneline"] -- git log --pretty= oneline
-- unit $ cmd "git log" ("--pretty=" ++ "oneline") -- git log --pretty=oneline
-- unit $ cmd "git log" ("--pretty=" ++ "one line") -- git log --pretty=one line
-- unit $ cmd "git log" ["--pretty=" ++ "one line"] -- git log "--pretty=one line"
--
--
-- More examples, including return values, see this translation of the
-- examples given for the command function:
--
-- -- () <- cmd "gcc -c myfile.c" -- compile a file, throwing an exception on failure -- unit $ cmd "gcc -c myfile.c" -- alternative to () <- binding. -- Exit c <- cmd "gcc -c" [myfile] -- run a command, recording the exit code -- (Exit c, Stderr err) <- cmd "gcc -c myfile.c" -- run a command, recording the exit code and error output -- Stdout out <- cmd "gcc -MM myfile.c" -- run a command, recording the output -- cmd (Cwd "generated") "gcc -c" [myfile] :: Action () -- run a command in a directory ---- -- When passing file arguments we use [myfile] so that if the -- myfile variable contains spaces they are properly escaped. -- -- If you use cmd inside a do block and do not use the -- result, you may get a compile-time error about being unable to deduce -- CmdResult. To avoid this error, bind the result to (), -- or include a type signature, or use the unit function. -- -- The cmd function can also be run in the IO monad, but -- then Traced is ignored and command lines are not echoed. As an -- example: -- --
-- cmd (Cwd "generated") Shell "gcc -c myfile.c" :: IO () --cmd :: CmdArguments args => (:->) args (Action r) -- | Lift a computation from the IO monad. liftIO :: MonadIO m => forall a. IO a -> m a -- | Options passed to command or cmd to control how -- processes are executed. data CmdOption :: * -- | Change the current directory in the spawned process. By default uses -- this processes current directory. Cwd :: FilePath -> CmdOption -- | Change the environment variables in the spawned process. By default -- uses this processes environment. Env :: [(String, String)] -> CmdOption -- | Add an environment variable in the child process. AddEnv :: String -> String -> CmdOption -- | Remove an environment variable from the child process. RemEnv :: String -> CmdOption -- | Add some items to the prefix and suffix of the $PATH -- variable. AddPath :: [String] -> [String] -> CmdOption -- | Given as the stdin of the spawned process. By default the -- stdin is inherited. Stdin :: String -> CmdOption -- | Given as the stdin of the spawned process. StdinBS :: ByteString -> CmdOption -- | Take the stdin from a file. FileStdin :: FilePath -> CmdOption -- | Pass the command to the shell without escaping - any arguments will be -- joined with spaces. By default arguments are escaped properly. Shell :: CmdOption -- | Treat the stdin/stdout/stderr messages as -- binary. By default String results use text encoding and -- ByteString results use binary encoding. BinaryPipes :: CmdOption -- | Name to use with traced, or "" for no tracing. By -- default traces using the name of the executable. Traced :: String -> CmdOption -- | Abort the computation after N seconds, will raise a failure exit code. -- Calls interruptProcessGroupOf and terminateProcess, -- but may sometimes fail to abort the process and not timeout. Timeout :: Double -> CmdOption -- | Should I include the stdout in the exception if the command -- fails? Defaults to False. WithStdout :: Bool -> CmdOption -- | Should I include the stderr in the exception if the command -- fails? Defaults to True. WithStderr :: Bool -> CmdOption -- | Should I echo the stdout? Defaults to True unless a -- Stdout result is required or you use FileStdout. EchoStdout :: Bool -> CmdOption -- | Should I echo the stderr? Defaults to True unless a -- Stderr result is required or you use FileStderr. EchoStderr :: Bool -> CmdOption -- | Should I put the stdout to a file. FileStdout :: FilePath -> CmdOption -- | Should I put the stderr to a file. FileStderr :: FilePath -> CmdOption -- | Compute dependencies automatically. AutoDeps :: CmdOption