-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Union mount filesystem paths into Haskell datastructures -- -- Union mount filesystem paths into Haskell datastructures @package unionmount @version 0.2.2.0 module System.UnionMount -- | Simplified version of unionMount with exactly one layer. mount :: forall model m b. (MonadIO m, MonadUnliftIO m, MonadLogger m, Show b, Ord b) => FilePath -> [(b, FilePattern)] -> [FilePattern] -> model -> (b -> FilePath -> FileAction () -> m (model -> model)) -> m (model, (model -> m ()) -> m ()) -- | Union mount a set of sources (directories) into a model. unionMount :: forall source tag model m. (MonadIO m, MonadUnliftIO m, MonadLogger m, Ord source, Ord tag) => Set (source, FilePath) -> [(tag, FilePattern)] -> [FilePattern] -> model -> (Change source tag -> m (model -> model)) -> m (model, (model -> m ()) -> m ()) -- | Like unionMount but without exception interrupting or -- re-mounting. unionMount' :: forall source tag m m1. (MonadIO m, MonadUnliftIO m, MonadLogger m, MonadLogger m1, MonadIO m1, Ord source, Ord tag) => Set (source, FilePath) -> [(tag, FilePattern)] -> [FilePattern] -> m1 (Change source tag, (Change source tag -> m ()) -> m Cmd) data FileAction a -- | A new file, or updated file, is available Refresh :: RefreshAction -> a -> FileAction a -- | The file just got deleted. Delete :: FileAction a data RefreshAction -- | No recent change. Just notifying of file's existance Existing :: RefreshAction -- | New file got created New :: RefreshAction -- | The already existing file was updated. Update :: RefreshAction type Change source tag = Map tag (Map FilePath (FileAction (NonEmpty (source, FilePath)))) instance GHC.Show.Show System.UnionMount.Cmd instance GHC.Classes.Eq System.UnionMount.Cmd instance GHC.Show.Show System.UnionMount.RefreshAction instance GHC.Classes.Eq System.UnionMount.RefreshAction instance GHC.Base.Functor System.UnionMount.FileAction instance GHC.Show.Show a => GHC.Show.Show (System.UnionMount.FileAction a) instance GHC.Classes.Eq a => GHC.Classes.Eq (System.UnionMount.FileAction a) instance GHC.Base.Functor System.UnionMount.FolderAction instance GHC.Show.Show a => GHC.Show.Show (System.UnionMount.FolderAction a) instance GHC.Classes.Eq a => GHC.Classes.Eq (System.UnionMount.FolderAction a) instance (GHC.Show.Show tag, GHC.Show.Show source) => GHC.Show.Show (System.UnionMount.Evt source tag) instance (GHC.Classes.Eq tag, GHC.Classes.Eq source) => GHC.Classes.Eq (System.UnionMount.Evt source tag)