A module for running compilable data types that take a list of file paths to compile.
- type Runner r = r -> [FilePath] -> IO ExitCode
- runner :: (r -> [FilePath] -> Runner r) -> Runner r
- runnerPath :: ([FilePath] -> Runner r) -> Runner r
- codeRunner :: ExitCode -> Runner r
- pathRunner :: ([FilePath] -> IO ExitCode) -> Runner r
- valueRunner :: (r -> IO ExitCode) -> Runner r
- andThen :: (r -> [FilePath] -> IO a) -> (a -> Runner r) -> Runner r
- ifRun :: (ExitCode -> Bool) -> Runner r -> Runner r -> Runner r
- (+++) :: Runner r -> Runner r -> Runner r
- (-+-) :: Runner r -> Runner r -> Runner r
- pathTransform :: ([FilePath] -> IO [FilePath]) -> Runner t -> Runner t
- (!!!) :: Compile c => Runner c
- (>->) :: (Output c, Compile c) => Runner c
- (+>->) :: (Output c, Compile c, OutputReference c) => Runner c
- (->-) :: (Output c, Extension c, Compile c) => Runner c
- (+->-) :: (Output r, Extension r, Compile r, OutputReference r) => Runner r
Documentation
type Runner r = r -> [FilePath] -> IO ExitCodeSource
A runner takes a list of file paths and runs a system command on them.
runnerPath :: ([FilePath] -> Runner r) -> Runner rSource
A runner that can access its list of file paths.
codeRunner :: ExitCode -> Runner rSource
A runner that always produces the given exit code.
pathRunner :: ([FilePath] -> IO ExitCode) -> Runner rSource
A runner that ignores its data type value.
valueRunner :: (r -> IO ExitCode) -> Runner rSource
A runner that ignores its list of file paths.
andThen :: (r -> [FilePath] -> IO a) -> (a -> Runner r) -> Runner rSource
Executes an action using runner arguments then produces a runner with the value of the previous action.
ifRun :: (ExitCode -> Bool) -> Runner r -> Runner r -> Runner rSource
Execute the second runner only if the exit code of the first runner satisfies the given predicate.
(+++) :: Runner r -> Runner r -> Runner rSource
Execute the second runner only if the exit code of the first runner is ExitSuccess
.
(-+-) :: Runner r -> Runner r -> Runner rSource
Execute the second runner only if the exit code of the first runner is not ExitSuccess
.
pathTransform :: ([FilePath] -> IO [FilePath]) -> Runner t -> Runner tSource
Transform the list of file paths before executing the runner.
(>->) :: (Output c, Compile c) => Runner cSource
Create the output target directory then execute the compile result as a system command.
(+>->) :: (Output c, Compile c, OutputReference c) => Runner cSource
Create the output target directory then incrementally execute the compile result as a system command. The output target is searched for the latest last-modification time and only those files in the output reference that are modified later than this time are submitted for compilation.
(->-) :: (Output c, Extension c, Compile c) => Runner cSource
A runner that recursively searches the output target for files that match a given extension and compiles them as a system command.
(+->-) :: (Output r, Extension r, Compile r, OutputReference r) => Runner rSource
A runner that recursively searches the output target for files that match a given extension and compiles them incrementally as a system command. The output target is searched for the latest last-modification time and only those files in the output reference that are modified later than this time are submitted for compilation.