-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Hakyll compiler for arbitrary external processes. -- -- Exposes Hakyll compilers for passing file paths to external processes. -- Transformed results are made available as Hakyll Items. @package hakyll-process @version 0.0.2.0 module Hakyll.Process -- | Helper function to indicate that the output file name is the same as -- the input file name with a new extension Note: like hakyll, assumes -- that no "." is present in the extension newExtension :: String -> FilePath -> FilePath -- | Helper function to indicate that the output file name is the same as -- the input file name with a new extension Note: like hakyll, assumes -- that no "." is present in the extension newExtOutFilePath :: String -> CompilerOut execName :: String -> ExecutableName -- | Calls the external compiler with no arguments. Returns the output -- contents as a ByteString. If an error occurs this raises an -- exception. May be useful if you already have build scripts for -- artifacts in your repository. execCompiler :: ExecutableName -> CompilerOut -> Compiler (Item ByteString) -- | Calls the external compiler with the provided arguments. Returns the -- output contents as a ByteString. If an error occurs this raises -- an exception. execCompilerWith :: ExecutableName -> ExecutableArgs -> CompilerOut -> Compiler (Item ByteString) -- | Primarily for internal use, occasionally useful when already building -- a compiler imperatively. Allows the caller to opt out of the -- declarative components of execCompiler and -- execCompilerWith. unsafeExecCompiler :: ExecutableName -> [String] -> (ByteString -> IO ByteString) -> Compiler (Item ByteString) -- | Expected output from the external compiler. data CompilerOut -- | Compiler uses stdout as the output type. CStdOut :: CompilerOut -- | Compiler outputs to a specific target file on the filesystem. COutFile :: OutFilePath -> CompilerOut -- | Arguments to provide to the process data ExecutableArg -- | Abstract representation of the path to the Hakyll item. HakFilePath :: ExecutableArg -- | Literal argument to provide to the other process. ProcArg :: String -> ExecutableArg -- | Arguments to pass to the executable. Empty if none. type ExecutableArgs = [ExecutableArg] -- | Name of the executable if in the PATH or path to it if not data ExecutableName -- | Specifies the output file path of a process. data OutFilePath -- | A specific, known filepath. SpecificPath :: FilePath -> OutFilePath -- | Indicates that the output path is related to the input path. RelativePath :: (FilePath -> FilePath) -> OutFilePath instance GHC.Show.Show Hakyll.Process.ExecutableName instance GHC.Read.Read Hakyll.Process.ExecutableName instance GHC.Show.Show Hakyll.Process.ExecutableArg instance GHC.Read.Read Hakyll.Process.ExecutableArg