directory-layout-0.6.1.1: 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

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

Interpret the directory layout as a Spec

data Validation e a Source

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

Constructors

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