Lastik-0.7.0: A library for compiling programs in a variety of languages

System.Build.Runner

Contents

Description

A module for running compilable data types that take a list of file paths to compile.

Synopsis

Runners

type Runner e r = r -> [FilePath] -> IO eSource

Chaining Runners

(>--) :: Monad m => m ExitCode -> m ExitCode -> m ExitCodeSource

Applies the second value only if the first produces ExitSuccess.

(>==) :: Monad m => m ExitCode -> m () -> m ()Source

Executes the second action only if the first produces ExitSuccess.

Transforming file paths

pathTransform :: ([FilePath] -> IO [FilePath]) -> Runner x t -> Runner x tSource

Transform the list of file paths before executing the runner.

pathTransform' :: Extensions e => e -> Runner x r -> Runner x rSource

Get all file paths with the given file extension (recursively) and execute the runner on those.

Running system command

(>->) :: (OutputDirectory c, Command c, CompilePaths c) => RunnerExit cSource

Create the output target directory then execute the compile result as a system command.

(->-) :: (OutputDirectory c, Extensions c, CompilePaths c, Command c) => RunnerExit cSource

A runner that recursively searches the output target for files that match a given extension and compiles them as a system command.

Chaining References.

(+>>)Source

Arguments

:: (OutputReferenceGet r, OutputReferenceSet r) 
=> FilePath

The file path to add.

-> r

The value to add the given file path to.

-> r

The value with the given file path added.

Adds the given file path to the reference target of the given value.

(++>>)Source

Arguments

:: (OutputReferenceGet r, OutputReferenceSet r) 
=> [FilePath]

The file paths to add.

-> r

The value to add the given file paths to.

-> r

The value with the given file paths added.

Adds the given file paths to the reference target of the given value.

(>===>)Source

Arguments

:: (OutputDirectory o, OutputReferenceGet r, OutputReferenceSet r) 
=> o

The value with an output target value to add.

-> r

The value to add the output target to.

-> r

The value after the output target has been added.

Adds the (potential) output target of the given value to the output target of the given value.

(>=>=>)Source

Arguments

:: (OutputDirectory o, OutputReferenceGet o, OutputReferenceGet r, OutputReferenceSet r) 
=> o

The value with an output target and output references to add.

-> r

The value to add the output target and output references to.

-> r

The value after the output target has been added.

Adds the (potential) output target and output references of the given value to the output target of the given value.