directory-layout- Directory layout DSL

Safe HaskellNone



A bunch of Layout description interpreters



pretty :: Layout a -> StringSource

Pretty print the directory layout

spec :: FilePath -> Layout a -> SpecSource

Interpret the directory layout as a Spec

data Validation e a Source

This type is isomorphic to Either but its Applicative instance accumulates errors


Error e 
Result a 

fromErrors :: [e] -> Validation (NonEmpty e) ()Source

Construct Validation value from the list of errors

>>> fromErrors []
Result ()
>>> fromErrors "hello"
Error ('h' :| "ello")

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

Check the real directory layout fits the description

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

Make the real directory layout from the description