remove uses of head/tail
This commit is contained in:
parent
8daa6fa09f
commit
20963afa17
4 changed files with 81 additions and 37 deletions
|
@ -9,6 +9,7 @@ import Info hiding (Text)
|
|||
|
||||
import Data.Maybe (fromMaybe, mapMaybe)
|
||||
import Data.Text.Lazy (Text)
|
||||
import Data.Foldable
|
||||
import System.FilePath
|
||||
|
||||
|
||||
|
@ -27,7 +28,9 @@ dependSingle' :: FilePath -> FilePath -> Info -> FilePath -> FilePath -> Bool
|
|||
dependSingle' yamlDir indexFile info prefix build nsfw =
|
||||
[b|$page: $deps $indexFile $$(MAKEPAGES)|]
|
||||
where
|
||||
images = #all if nsfw then #images info else #sfwImages info
|
||||
images =
|
||||
maybe [] (toList . #all) $
|
||||
if nsfw then Just $ #images info else #sfwImages info
|
||||
|
||||
paths = map #path images
|
||||
dls = mapMaybe #download images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue