Path.Internal

path-0.5.7: Support for well-typed paths

Safe Haskell | Safe
Language | Haskell98

Path.Internal

Description

Internal types and functions.

Synopsis

- newtype Path b t = Path FilePath

# Documentation

newtype Path b t

Path of some base and type.

Internally is a string. The string can be of two formats only:

1. File format: `file.txt`, `foo/bar.txt`, `/foo/bar.txt`
2. Directory format: `foo/`, `/foo/bar/`

All directories end in a trailing separator. There are no duplicate path separators `//`, no `..`, no `./`, no `~/`, etc.

Constructors

Path FilePath |

Instances

Eq (Path b t) | String equality. The following property holds:
    show x == show y ≡ x == y
Ord (Path b t) | String ordering. The following property holds:
    show x `compare` show y ≡ x `compare` y
Show (Path b t) | Same as `toFilePath`. The following property holds:
    x == y ≡ show x == show y
NFData (Path b t) |