shake-plus-0.2.0.1: Re-export of Shake using well-typed paths and ReaderT.

CopyrightCopyright (C) 2020 Daniel Firth
MaintainerDaniel Firth <dan.firth@homotopic.tech
Safe HaskellNone
LanguageHaskell2010

Development.Shake.Plus.File

Description

License : MIT Stability : experimental

File utilities in Development.Shake lifted to MonadAction and FileLike/DirLike.

Synopsis

Documentation

copyFile :: (MonadAction m, FileLike b a, FileLike b' a', Partial) => a -> a' -> m () Source #

Lifted version of copyFile that copies between any two FileLike.

copyFile' :: (MonadAction m, FileLike b a, Partial) => a -> a -> m () Source #

Like copyFile but for FileLikes that are of the same type, useful for type inference.

copyFileChanged :: (MonadAction m, FileLike b a, FileLike b' a', Partial) => a -> a' -> m () Source #

Lifted version of copyFileChanged' that copies between two FileLike.

copyFileChanged' :: (MonadAction m, FileLike b a, Partial) => a -> a -> m () Source #

Like copyFileChanged but ensures the FileLikes are of the same type, useful for type inference.

readFile' :: (MonadAction m, FileLike b a, Partial) => a -> m Text Source #

Lifted version of readFile' that reads any FileLike.

readFileLines :: (MonadAction m, FileLike b a, Partial) => a -> m [Text] Source #

Lifted version of readFileLines that reads any FileLike.

readFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> m Text Source #

Like readFile', but with an argument for the parent directory. Used for symmetry with the way getDirectoryFiles takes arguments.

writeFile' :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m () Source #

Lifted version of writeFile that writes to any FileLike.

writeFileLines :: (MonadAction m, FileLike b a, Partial) => a -> [Text] -> m () Source #

Lifted version of writeFileLines that writes to any FileLike.

writeFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m () Source #

Like writeFile', but with an argument for the parent directory. Used for symmetry with the way getDirectoryFiles takes arguments.

writeFileChanged :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m () Source #

Lifted version of writeFileChanged that writes to any FileLike.

writeFileChangedIn :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m () Source #

Like writeFileChanged', but with an argument for the parent directory. Used for symmetry with the way getDirectoryFiles takes arguments.

removeFiles :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m () Source #

Lifted version of removeFiles that accepts any DirLike.

removeFilesAfter :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m () Source #

Lifted version of removeFilesAfter that accepts any DirLike..

class PathLike b File a => FileLike b a where #

Class representing a type a that can be compiled down to a `Path b File`.

Minimal complete definition

Nothing

Methods

toFile :: a -> Path b File #

Instances
FileLike b (Path b File) 
Instance details

Defined in Path.Like

Methods

toFile :: Path b File -> Path b File #

FileLike Rel a => FileLike b (Within b a) 
Instance details

Defined in Within

Methods

toFile :: Within b a -> Path b File #

class PathLike b Dir a => DirLike b a where #

Class repreenting a type a that can be compiled down to a `Path b Dir`.

Minimal complete definition

Nothing

Methods

toDir :: a -> Path b Dir #

Instances
DirLike Rel a => DirLike b (Within b a) 
Instance details

Defined in Within

Methods

toDir :: Within b a -> Path b Dir #

DirLike b (Path b Dir) 
Instance details

Defined in Path.Like

Methods

toDir :: Path b Dir -> Path b Dir #

(/>) :: (DirLike b a, FileLike Rel c) => a -> c -> Path b File #

Like </>, but works for any DirLike and relative FileLike to produce a concrete Path.