monopati-0.1.0: Well-typed paths

Safe HaskellSafe
LanguageHaskell2010

System.Monopati

Synopsis

Documentation

data Path (reference :: Reference) (points :: Points) Source #

These two phantom paramaters needs for static analysis

Constructors

Path 

Fields

Instances
Show (Path Absolute points) Source # 
Instance details

Defined in System.Monopati

Methods

showsPrec :: Int -> Path Absolute points -> ShowS #

show :: Path Absolute points -> String #

showList :: [Path Absolute points] -> ShowS #

Show (Path Relative points) Source # 
Instance details

Defined in System.Monopati

Methods

showsPrec :: Int -> Path Relative points -> ShowS #

show :: Path Relative points -> String #

showList :: [Path Relative points] -> ShowS #

data Points Source #

Path may points to a directory or a file

Constructors

Directory 
File 

data Reference Source #

Relative paths defined in direct order, absolute - in reverse

Constructors

Absolute 
Relative 

part :: String -> Path referece points Source #

Immerse some string into a path component

(<^>) :: Path Relative Directory -> Path Relative points -> Path Relative points Source #

Concatenate Relative and Relative paths

(</>) :: Path Absolute Directory -> Path Relative points -> Path Absolute points Source #

Concatenate Absolute and Relative paths