| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Directory.Layout.Interpreter
Description
A bunch of Layout description interpreters
- pretty :: Layout a -> String
- spec :: FilePath -> Layout a -> Spec
- data Validation e a
- fromErrors :: [e] -> Validation (NonEmpty e) ()
- fit :: FilePath -> Layout a -> IO (Validation (NonEmpty FitError) ())
- data FitError
- data FitContentsError
- make :: FilePath -> Layout a -> IO (Validation (NonEmpty MakeError) ())
- data MakeError = MakeIOException FilePath IOErrorType
Documentation
data Validation e a Source
This type is isomorphic to Either but its Applicative instance accumulates errors
Instances
| Bitraversable Validation | |
| Bifunctor Validation | |
| Bifoldable Validation | |
| Functor (Validation e) | |
| Semigroup e => Applicative (Validation e) | |
| Foldable (Validation e) | |
| Traversable (Validation e) | |
| (Eq e, Eq a) => Eq (Validation e a) | |
| (Data e, Data a) => Data (Validation e a) | |
| (Ord e, Ord a) => Ord (Validation e a) | |
| (Show e, Show a) => Show (Validation e a) | |
| Generic (Validation e a) | |
| Typeable (* -> * -> *) Validation | |
| type Rep (Validation e 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
Errors encountered while running fit
data FitContentsError Source
Expected/actual file contents mismatch
Constructors
| FitBadBinary ByteString ByteString | |
| FitBadText Text Text | |
| FitBadCopyOf FilePath |
Instances