Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmcstanton committed Oct 16, 2020
1 parent 2f279bc commit e8b6561
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Hakyll/Process.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data CompilerOut =

-- | Arguments to provide to the process
data ExecutableArg =
-- | Abstract representation the path to the Hakyll item.
-- | Abstract representation of the path to the Hakyll item.
HakFilePath
-- | Literal argument to provide to the other process.
| ProcArg String deriving (Read, Show)
Expand All @@ -45,24 +45,24 @@ newtype ExecutableName = ExecutableName String deriving (Read, Show)
type ExecutableArgs = [ExecutableArg]

-- | 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
-- Note: like hakyll, assumes that no "." is present in the extension
newExtension :: String -> FilePath -> FilePath
newExtension ext f = (reverse . dropWhile (/= '.') . reverse $ f) <> ext

-- | 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
-- Note: like hakyll, assumes that no "." is present in the extension
newExtOutFilePath :: String -> CompilerOut
newExtOutFilePath ext = COutFile $ RelativePath (newExtension ext)

execName :: String -> ExecutableName
execName = ExecutableName

-- | Calls the external compiler with no arguments. Returns the output contents as a `ByteString`.
-- | Calls the external compiler with no arguments. Returns the output contents as a 'B.ByteString'.
-- If an error occurs this raises an exception.
execCompiler :: ExecutableName -> CompilerOut -> Compiler (Item B.ByteString)
execCompiler name out = execCompilerWith name [] out

-- | Calls the external compiler with the provided arguments. Returns the output contents as a `ByteString`.
-- | Calls the external compiler with the provided arguments. Returns the output contents as a 'B.ByteString'.
-- If an error occurs this raises an exception.
execCompilerWith :: ExecutableName -> ExecutableArgs -> CompilerOut -> Compiler (Item B.ByteString)
execCompilerWith name exArgs out = do
Expand Down

0 comments on commit e8b6561

Please sign in to comment.