Avoid extra untupling in this case for now
This commit is contained in:
parent
5d5dbbec74
commit
e770a350d6
|
@ -26,6 +26,7 @@ module DependencyGenerator
|
|||
, convertImage
|
||||
, saveFile
|
||||
, copyFile
|
||||
, copyFile'
|
||||
, makeDir
|
||||
, runPandoc
|
||||
) where
|
||||
|
@ -204,6 +205,9 @@ copyFile (a, b) = do
|
|||
b' <- toToken b
|
||||
runFunctionIO' CopyFile $ TupleToken (a', b')
|
||||
|
||||
copyFile' :: Token (FilePath, FilePath) -> DepGenM ()
|
||||
copyFile' = runFunctionIO' CopyFile
|
||||
|
||||
makeDir :: TokenableTo FilePath a => a -> DepGenM ()
|
||||
makeDir a = runFunctionIO' MakeDir =<< toToken a
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ handleRecipeDir outputDir template indexName dir = do
|
|||
imageFilenames <- filterDepGenM areImageFilenames dirContents
|
||||
imagePaths <- mapDepGenM (curry joinPaths dir) imageFilenames
|
||||
imagePathsOut <- mapDepGenM (curry joinPaths outputDir) imageFilenames
|
||||
mapDepGenM_ ((copyFile =<<) . untupleDepGenM) (ZipToken (imagePaths, imagePathsOut))
|
||||
mapDepGenM_ copyFile' (ZipToken (imagePaths, imagePathsOut))
|
||||
thumbnailImagePaths <- mapDepGenM (thumbnailImagePath outputDir) imageFilenames
|
||||
mapDepGenM_
|
||||
(\files -> convertImage (files, inject $ ResizeToWidth 800))
|
||||
|
|
Loading…
Reference in New Issue