hpath-0.10.1: Support for well-typed paths

Safe HaskellSafe
LanguageHaskell2010

HPath.Internal

Description

Internal types and functions.

Synopsis

Documentation

data Path b Source #

Path of some base and type.

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

  1. without trailing path separator: file.txt, foo/bar.txt, /foo/bar.txt
  2. with trailing path separator: foo/, /foo/bar/

There are no duplicate path separators //, no .., no ./, no ~/, etc.

Constructors

MkPath ByteString 
Instances
Eq (Path b) Source #

ByteString equality.

The following property holds:

show x == show y ≡ x == y
Instance details

Defined in HPath.Internal

Methods

(==) :: Path b -> Path b -> Bool #

(/=) :: Path b -> Path b -> Bool #

Ord (Path b) Source #

ByteString ordering.

The following property holds:

show x `compare` show y ≡ x `compare` y
Instance details

Defined in HPath.Internal

Methods

compare :: Path b -> Path b -> Ordering #

(<) :: Path b -> Path b -> Bool #

(<=) :: Path b -> Path b -> Bool #

(>) :: Path b -> Path b -> Bool #

(>=) :: Path b -> Path b -> Bool #

max :: Path b -> Path b -> Path b #

min :: Path b -> Path b -> Path b #

Show (Path b) Source #

Same as toFilePath.

The following property holds:

x == y ≡ show x == show y
Instance details

Defined in HPath.Internal

Methods

showsPrec :: Int -> Path b -> ShowS #

show :: Path b -> String #

showList :: [Path b] -> ShowS #

Lift (Path a) Source # 
Instance details

Defined in HPath

Methods

lift :: Path a -> Q Exp #

NFData (Path b) Source # 
Instance details

Defined in HPath.Internal

Methods

rnf :: Path b -> () #