directory-layout-0.7.1.0: Directory layout DSL

Safe HaskellNone
LanguageHaskell2010

System.Directory.Layout.Interpreter

Description

A bunch of Layout description interpreters

Synopsis

Documentation

pretty :: Layout a -> String Source

Pretty print the directory layout

examples :: FilePath -> Layout a -> Spec Source

Interpret the directory layout as a Spec

fromErrors :: Foldable t => t e -> Either (NonEmpty e) () Source

Construct Validation value from the list of errors

>>> fromErrors []
Right ()
>>> fromErrors Nothing
Right ()
>>> fromErrors "hello"
Left ('h' :| "ello")
>>> fromErrors (Just "hello")
Left ("hello" :| [])

fit :: FilePath -> Layout a -> IO (Either (NonEmpty FitError) ()) Source

Check the real directory layout fits the description

make :: FilePath -> Layout a -> IO (Either (NonEmpty MakeError) ()) Source

Make the real directory layout from the description

remake :: FilePath -> Layout a -> IO (Either (NonEmpty MakeError) ()) Source

Make the real directory layout from the description removing any previous contents