diff --git a/byg/src/DependencyGenerator.hs b/byg/src/DependencyGenerator.hs index a376d15..3e954e7 100644 --- a/byg/src/DependencyGenerator.hs +++ b/byg/src/DependencyGenerator.hs @@ -74,6 +74,11 @@ runFunction f input = genDependency (makeDependency input (Function f)) runFunctionIO :: FunctionIO -> Token a -> DepGenM' b runFunctionIO f input = genDependency (makeDependency input (FunctionIO f)) +runFunctionIO' :: FunctionIO -> Token a -> DepGenM () +runFunctionIO' f input = do + _ <- runFunctionIO f input + pure () + mapDepGenM :: (Token a -> DepGenM' b) -> Token [a] -> DepGenM' [b] mapDepGenM f input = genDependencyM $ \target -> do top <- get @@ -114,19 +119,13 @@ readTemplate :: Token FilePath -> DepGenM' Template readTemplate = runFunctionIO ReadTemplate convertImage :: Token ((FilePath, FilePath), ImageConversionSettings) -> DepGenM () -convertImage input = do - _ <- runFunctionIO ConvertImage input - pure () +convertImage = runFunctionIO' ConvertImage saveFile :: Token (String, FilePath) -> DepGenM () -saveFile input = do - _ <- runFunctionIO SaveFile input - pure () +saveFile = runFunctionIO' SaveFile makeDir :: Token FilePath -> DepGenM () -makeDir input = do - _ <- runFunctionIO MakeDir input - pure () +makeDir = runFunctionIO' MakeDir runPandoc :: Token FilePath -> DepGenM' String runPandoc = runFunctionIO RunPandoc