shake-ext-0.2.0.3: src/Development/Shake/FileDetect.hs
module Development.Shake.FileDetect
( getAts
, getSats
, getHats
, getYml
, getToml
, getHs
, getHappy
, getAlex
, getShell
) where
import Data.Semigroup ((<>))
import Development.Shake
getYml :: Action [FilePath]
getYml = getAll ["yaml", "yml", "yamllint"]
getToml :: Action [FilePath]
getToml = getAll ["toml"]
getHs :: Action [FilePath]
getHs = getAll ["hs", "hs-boot", "hsig", "lhs"]
getHappy :: Action [FilePath]
getHappy = getAll ["y", "yl"]
getAlex :: Action [FilePath]
getAlex = getAll ["x"]
getShell :: Action [FilePath]
getShell = getDirectoryFiles "" ["//*.sh"]
get :: String -> Action [FilePath]
get = getAll . pure
getAll :: [String] -> Action [FilePath]
getAll ss = getDirectoryFiles "" (("//*." ++) <$> ss)
getSats :: Action [FilePath]
getSats = get "sats"
getDats :: Action [FilePath]
getDats = get "dats"
getHats :: Action [FilePath]
getHats = get "hats"
getAts :: Action [FilePath]
getAts = (<>) <$> getDats <*> getSats