| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Simple.FileMonitor.Types
Description
Types for monitoring files and directories.
Synopsis
- data RootedGlob = RootedGlob FilePathRoot Glob
- data FilePathRoot
- data Glob
- data MonitorFilePath
- data MonitorKindFile
- data MonitorKindDir
- monitorFile :: FilePath -> MonitorFilePath
- monitorFileHashed :: FilePath -> MonitorFilePath
- monitorNonExistentFile :: FilePath -> MonitorFilePath
- monitorFileExistence :: FilePath -> MonitorFilePath
- monitorDirectory :: FilePath -> MonitorFilePath
- monitorNonExistentDirectory :: FilePath -> MonitorFilePath
- monitorDirectoryExistence :: FilePath -> MonitorFilePath
- monitorFileOrDirectory :: FilePath -> MonitorFilePath
- monitorFileGlob :: RootedGlob -> MonitorFilePath
- monitorFileGlobExistence :: RootedGlob -> MonitorFilePath
- monitorFileSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath]
- monitorFileHashedSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath]
Globs with respect to a root
data RootedGlob #
A file path specified by globbing, relative to some root directory.
Constructors
| RootedGlob | |
Fields
| |
Instances
data FilePathRoot #
Constructors
| FilePathRelative | |
| FilePathRoot FilePath | e.g. |
| FilePathHomeDir |
Instances
| Parsec FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods parsec :: CabalParsing m => m FilePathRoot Source # | |||||
| Pretty FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods pretty :: FilePathRoot -> Doc Source # prettyVersioned :: CabalSpecVersion -> FilePathRoot -> Doc Source # | |||||
| Structured FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy FilePathRoot -> Structure Source # structureHash' :: Tagged FilePathRoot MD5 | |||||
| Binary FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types | |||||
| Eq FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types | |||||
| Generic FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
| |||||
| Show FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods showsPrec :: Int -> FilePathRoot -> ShowS # show :: FilePathRoot -> String # showList :: [FilePathRoot] -> ShowS # | |||||
| type Rep FilePathRoot # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep FilePathRoot = D1 ('MetaData "FilePathRoot" "Distribution.Simple.FileMonitor.Types" "Cabal-3.16.0.0-9b60" 'False) (C1 ('MetaCons "FilePathRelative" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FilePathRoot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: C1 ('MetaCons "FilePathHomeDir" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
A filepath specified by globbing.
Instances
| Parsec Glob # | |||||
Defined in Distribution.Simple.Glob.Internal Methods parsec :: CabalParsing m => m Glob Source # | |||||
| Pretty Glob # | |||||
Defined in Distribution.Simple.Glob.Internal | |||||
| Structured Glob # | |||||
Defined in Distribution.Simple.Glob.Internal | |||||
| Binary Glob # | |||||
| Eq Glob # | |||||
| Generic Glob # | |||||
Defined in Distribution.Simple.Glob.Internal Associated Types
| |||||
| Show Glob # | |||||
| type Rep Glob # | |||||
Defined in Distribution.Simple.Glob.Internal type Rep Glob = D1 ('MetaData "Glob" "Distribution.Simple.Glob.Internal" "Cabal-3.16.0.0-9b60" 'False) ((C1 ('MetaCons "GlobDir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Glob)) :+: C1 ('MetaCons "GlobDirRecursive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces))) :+: (C1 ('MetaCons "GlobFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces)) :+: C1 ('MetaCons "GlobDirTrailing" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
File monitoring
data MonitorFilePath #
A description of a file (or set of files) to monitor for changes.
Where file paths are relative they are relative to a common directory (e.g. project root), not necessarily the process current directory.
Constructors
| MonitorFile | |
Fields | |
| MonitorFileGlob | |
Fields | |
Instances
| Structured MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorFilePath -> Structure Source # structureHash' :: Tagged MonitorFilePath MD5 | |||||
| Binary MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorFilePath -> Put # get :: Get MonitorFilePath # putList :: [MonitorFilePath] -> Put # | |||||
| Eq MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorFilePath -> MonitorFilePath -> Bool # (/=) :: MonitorFilePath -> MonitorFilePath -> Bool # | |||||
| Generic MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorFilePath -> Rep MonitorFilePath x # to :: Rep MonitorFilePath x -> MonitorFilePath # | |||||
| Show MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods showsPrec :: Int -> MonitorFilePath -> ShowS # show :: MonitorFilePath -> String # showList :: [MonitorFilePath] -> ShowS # | |||||
| type Rep MonitorFilePath # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorFilePath = D1 ('MetaData "MonitorFilePath" "Distribution.Simple.FileMonitor.Types" "Cabal-3.16.0.0-9b60" 'False) (C1 ('MetaCons "MonitorFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FilePath))) :+: C1 ('MetaCons "MonitorFileGlob" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPathGlob") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RootedGlob)))) | |||||
data MonitorKindFile #
Constructors
| FileExists | |
| FileModTime | |
| FileHashed | |
| FileNotExists |
Instances
| Structured MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorKindFile -> Structure Source # structureHash' :: Tagged MonitorKindFile MD5 | |||||
| Binary MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorKindFile -> Put # get :: Get MonitorKindFile # putList :: [MonitorKindFile] -> Put # | |||||
| Eq MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorKindFile -> MonitorKindFile -> Bool # (/=) :: MonitorKindFile -> MonitorKindFile -> Bool # | |||||
| Generic MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorKindFile -> Rep MonitorKindFile x # to :: Rep MonitorKindFile x -> MonitorKindFile # | |||||
| Show MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods showsPrec :: Int -> MonitorKindFile -> ShowS # show :: MonitorKindFile -> String # showList :: [MonitorKindFile] -> ShowS # | |||||
| type Rep MonitorKindFile # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorKindFile = D1 ('MetaData "MonitorKindFile" "Distribution.Simple.FileMonitor.Types" "Cabal-3.16.0.0-9b60" 'False) ((C1 ('MetaCons "FileExists" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FileModTime" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FileHashed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FileNotExists" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data MonitorKindDir #
Constructors
| DirExists | |
| DirModTime | |
| DirNotExists |
Instances
| Structured MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorKindDir -> Structure Source # structureHash' :: Tagged MonitorKindDir MD5 | |||||
| Binary MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorKindDir -> Put # get :: Get MonitorKindDir # putList :: [MonitorKindDir] -> Put # | |||||
| Eq MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorKindDir -> MonitorKindDir -> Bool # (/=) :: MonitorKindDir -> MonitorKindDir -> Bool # | |||||
| Generic MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorKindDir -> Rep MonitorKindDir x # to :: Rep MonitorKindDir x -> MonitorKindDir # | |||||
| Show MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods showsPrec :: Int -> MonitorKindDir -> ShowS # show :: MonitorKindDir -> String # showList :: [MonitorKindDir] -> ShowS # | |||||
| type Rep MonitorKindDir # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorKindDir = D1 ('MetaData "MonitorKindDir" "Distribution.Simple.FileMonitor.Types" "Cabal-3.16.0.0-9b60" 'False) (C1 ('MetaCons "DirExists" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DirModTime" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DirNotExists" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Utility constructors of MonitorFilePath
monitorFile :: FilePath -> MonitorFilePath #
Monitor a single file for changes, based on its modification time. The monitored file is considered to have changed if it no longer exists or if its modification time has changed.
monitorFileHashed :: FilePath -> MonitorFilePath #
Monitor a single file for changes, based on its modification time and content hash. The monitored file is considered to have changed if it no longer exists or if its modification time and content hash have changed.
monitorNonExistentFile :: FilePath -> MonitorFilePath #
Monitor a single non-existent file for changes. The monitored file is considered to have changed if it exists.
monitorFileExistence :: FilePath -> MonitorFilePath #
Monitor a single file for existence only. The monitored file is considered to have changed if it no longer exists.
monitorDirectory :: FilePath -> MonitorFilePath #
Monitor a single directory for changes, based on its modification time. The monitored directory is considered to have changed if it no longer exists or if its modification time has changed.
monitorNonExistentDirectory :: FilePath -> MonitorFilePath #
Monitor a single non-existent directory for changes. The monitored directory is considered to have changed if it exists.
monitorDirectoryExistence :: FilePath -> MonitorFilePath #
Monitor a single directory for existence. The monitored directory is considered to have changed only if it no longer exists.
monitorFileOrDirectory :: FilePath -> MonitorFilePath #
Monitor a single file or directory for changes, based on its modification time. The monitored file is considered to have changed if it no longer exists or if its modification time has changed.
monitorFileGlob :: RootedGlob -> MonitorFilePath #
Monitor a set of files (or directories) identified by a file glob. The monitored glob is considered to have changed if the set of files matching the glob changes (i.e. creations or deletions), or for files if the modification time and content hash of any matching file has changed.
monitorFileGlobExistence :: RootedGlob -> MonitorFilePath #
Monitor a set of files (or directories) identified by a file glob for existence only. The monitored glob is considered to have changed if the set of files matching the glob changes (i.e. creations or deletions).
monitorFileSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath] #
Creates a list of files to monitor when you search for a file which
unsuccessfully looked in notFoundAtPaths before finding it at
foundAtPath.
monitorFileHashedSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath] #
Similar to monitorFileSearchPath, but also instructs us to
monitor the hash of the found file.