directory-layout-0.4.0.1: Declare, construct and verify directory layout

Safe HaskellNone

System.Directory.Layout.Internal

Description

Free monad based directory layouts

Synopsis

Documentation

data Node a Source

A representation of directory layouts

Invariants:

  • F second argument is never D _ _ _ or F _ _ _ itself
  • F third argument is never T _ _
  • D second argument is never T _ _
  • D third argument is never T _ _

Constructors

E !a

Emptyness, nothing found here

T !Text !a

File contents

F !FilePath !Layout !(Node a)

File node

D !FilePath !Layout !(Node a)

Directory node

Instances

Monad Node

All this crazy stuff is only to get do-notation basically.

Bind (<-) in that do-notation is useless at best (You only can get ()s from Layout) and harmful at worst (If you manage to create your own Node values with something more interesting than ())

Functor Node 
Applicative Node 
Foldable Node 
Traversable Node 
Apply Node 
Bind Node 
Eq a => Eq (Node a) 
Ord a => Ord (Node a) 
Read a => Read (Node a) 
Show a => Show (Node a) 
Default a => Monoid (Node a) 
Default a => Default (Node a) 
Semigroup (Node a) 

type Layout = Node ()Source

Type synonym to save some acrobatics