Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newExtension :: String -> FilePath -> FilePath
- newExtOutFilePath :: String -> CompilerOut
- execName :: String -> ExecutableName
- execCompiler :: ExecutableName -> CompilerOut -> Compiler (Item ByteString)
- execCompilerWith :: ExecutableName -> ExecutableArgs -> CompilerOut -> Compiler (Item ByteString)
- data CompilerOut
- data ExecutableArg
- type ExecutableArgs = [ExecutableArg]
- data ExecutableName
- data OutFilePath
- = SpecificPath FilePath
- | RelativePath (FilePath -> FilePath)
Documentation
newExtension :: String -> FilePath -> FilePath Source #
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 Source #
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
execName :: String -> ExecutableName Source #
execCompiler :: ExecutableName -> CompilerOut -> Compiler (Item ByteString) Source #
Calls the external compiler with no arguments. Returns the output contents as a ByteString
.
If an error occurs this raises an exception.
execCompilerWith :: ExecutableName -> ExecutableArgs -> CompilerOut -> Compiler (Item ByteString) Source #
Calls the external compiler with the provided arguments. Returns the output contents as a ByteString
.
If an error occurs this raises an exception.
data CompilerOut Source #
Expected output from the external compiler.
CStdOut | Compiler uses stdout as the output type. |
COutFile OutFilePath | Compiler outputs to a specific target file on the filesystem. |
data ExecutableArg Source #
Arguments to provide to the process
HakFilePath | Abstract representation of the path to the Hakyll item. |
ProcArg String | Literal argument to provide to the other process. |
Instances
Read ExecutableArg Source # | |
Defined in Hakyll.Process readsPrec :: Int -> ReadS ExecutableArg # readList :: ReadS [ExecutableArg] # | |
Show ExecutableArg Source # | |
Defined in Hakyll.Process showsPrec :: Int -> ExecutableArg -> ShowS # show :: ExecutableArg -> String # showList :: [ExecutableArg] -> ShowS # |
type ExecutableArgs = [ExecutableArg] Source #
Arguments to pass to the executable. Empty if none.
data ExecutableName Source #
Name of the executable if in the PATH or path to it if not
Instances
Read ExecutableName Source # | |
Defined in Hakyll.Process readsPrec :: Int -> ReadS ExecutableName # readList :: ReadS [ExecutableName] # | |
Show ExecutableName Source # | |
Defined in Hakyll.Process showsPrec :: Int -> ExecutableName -> ShowS # show :: ExecutableName -> String # showList :: [ExecutableName] -> ShowS # |
data OutFilePath Source #
Specifies the output file path of a process.
SpecificPath FilePath | A specific, known filepath. |
RelativePath (FilePath -> FilePath) | Indicates that the output path is related to the input path. |