-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Declare, construct and verify directory layout -- -- Language to express directory layouts @package directory-layout @version 0.2.0.0 -- | Check if current directory layout agrees with specified one -- -- For example, suppose there is a tree: -- --
-- % tree -- . -- ├── baz -- │ └── twey -- └── foo -- ├── bar -- │ ├── quuz -- │ └── tatata -- └── quux ---- -- then you can write: -- --
-- layout = do -- directory "baz" $ -- file_ "twey" -- directory "foo" $ do -- directory "bar" $ do -- file_ "quuz" -- file_ "tatata" -- file_ "quux" ---- -- and running check layout "." should result in [] module System.Directory.Layout.Check -- | Data type representing various failures that may occur while checking -- directory layout data DLCheckFailure FileDoesNotExist :: FilePath -> DLCheckFailure FileWrongContents :: FilePath -> Text -> DLCheckFailure DirectoryDoesNotExist :: FilePath -> DLCheckFailure -- | Check directory layout corresponds to specified one check :: Layout -> FilePath -> IO [DLCheckFailure] instance Show DLCheckFailure instance Read DLCheckFailure instance Eq DLCheckFailure instance Ord DLCheckFailure -- | Make layout as specified -- -- For example, suppose you are in an empty directory -- --
-- % tree -- . ---- -- and you've written simple layout: -- --
-- layout = do -- directory "baz" $ -- file_ "twey" -- directory "foo" $ do -- directory "bar" $ do -- file_ "quuz" -- file_ "tatata" -- file_ "quux" ---- -- then running it should result in this directory tree: -- --
-- % tree -- . -- ├── baz -- │ └── twey -- └── foo -- ├── bar -- │ ├── quuz -- │ └── tatata -- └── quux --module System.Directory.Layout.Make -- | Data type representing various warnings that may occur while infecting -- directory layout data DLMakeWarning FileDoesExist :: FilePath -> DLMakeWarning DirectoryDoesExist :: FilePath -> DLMakeWarning -- | Infect file layout with stuff from script make :: Layout -> FilePath -> IO [DLMakeWarning] instance Show DLMakeWarning instance Read DLMakeWarning instance Eq DLMakeWarning instance Ord DLMakeWarning -- | Parser for text format for DL data structure, for example -- --
-- c/ -- ..x -- ..y -- ....n -- ....n -- .... -- ..z -- ....t -- ....t -- .... -- d/ ---- -- where . stands for space is equivalent of -- --
-- do directory "c" $ do -- file_ "x" -- file "y" "nnnn" -- file "z" "tntn" -- directory_ "d" --module System.Directory.Layout.Parser -- | lazy Text parser layout :: Text -> Either String Layout -- | strict Text parser layout' :: Text -> Either String Layout module System.Directory.Layout -- | Abstract data type representing directory tree is nice data DL f -- | But type synonym is nicer type Layout = DL () -- | Declare file with specified contents file :: FilePath -> Text -> Layout -- | Declare empty file file_ :: FilePath -> Layout -- | Declare directory with specified listing directory :: FilePath -> Layout -> Layout -- | Declare empty directory directory_ :: FilePath -> Layout -- | Data type representing various warnings that may occur while infecting -- directory layout data DLMakeWarning FileDoesExist :: FilePath -> DLMakeWarning DirectoryDoesExist :: FilePath -> DLMakeWarning -- | Infect file layout with stuff from script make :: Layout -> FilePath -> IO [DLMakeWarning] -- | Data type representing various failures that may occur while checking -- directory layout data DLCheckFailure FileDoesNotExist :: FilePath -> DLCheckFailure FileWrongContents :: FilePath -> Text -> DLCheckFailure DirectoryDoesNotExist :: FilePath -> DLCheckFailure -- | Check directory layout corresponds to specified one check :: Layout -> FilePath -> IO [DLCheckFailure] -- | lazy Text parser layout :: Text -> Either String Layout -- | strict Text parser layout' :: Text -> Either String Layout