directory-layout-0.7.4: Directory layout DSL

Safe HaskellNone

System.Directory.Layout.Interpreter

Description

A bunch of Layout description interpreters

Synopsis

Documentation

pretty :: Layout a -> StringSource

Pretty print the directory layout

examples :: FilePath -> Layout a -> SpecSource

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