Module

Pathy.Phantom

Package
purescript-pathy
Repository
slamdata/purescript-pathy

#RelOrAbs Source

data RelOrAbs :: Type

The kind for the relative/absolute phantom type.

#Rel Source

data Rel :: RelOrAbs

The phantom type of relative paths.

Instances

#Abs Source

data Abs :: RelOrAbs

The phantom type of absolute paths.

Instances

#IsRelOrAbs Source

class IsRelOrAbs (a :: RelOrAbs)  where

A class that enables writing operations that abstract over RelOrAbs.

The provided onRelOrAbs function folds over a value indexed by RelOrAbs to produce a new result, passing proof/coercion functions to allow the inner functions to unify their return types if remapping.

Members

  • onRelOrAbs :: forall r b f. ((f Rel b -> f a b) -> f Rel b -> r) -> ((f Abs b -> f a b) -> f Abs b -> r) -> f a b -> r

Instances

#foldRelOrAbs Source

foldRelOrAbs :: forall r b a f. IsRelOrAbs a => (f Rel b -> r) -> (f Abs b -> r) -> f a b -> r

Folds over a value that uses RelOrAbs to produce a new result.

#DirOrFile Source

data DirOrFile :: Type

The kind for the directory/file phantom type.

#Dir Source

data Dir :: DirOrFile

The phantom type of directories.

Instances

#File Source

data File :: DirOrFile

The phantom type of files.

Instances

#IsDirOrFile Source

class IsDirOrFile (b :: DirOrFile)  where

A class that enables writing operations that abstract over DirOrFile.

The provided onDirOrFile function folds over a value indexed by DirOrFile to produce a new result, passing proof/coercion functions to allow the inner functions to unify their return types if remapping.

Members

Instances

#foldDirOrFile Source

foldDirOrFile :: forall r b f. IsDirOrFile b => (f Dir -> r) -> (f File -> r) -> f b -> r

Folds over a value that uses DirOrFile to produce a new result.