path-extra-0.0.3: Chris Done's path library, enriched with URL-related goodies.

Safe HaskellNone
LanguageHaskell2010

Path.Extended

Contents

Synopsis

Types

data Location b t #

A location for some base and type - internally uses Path.

Instances

PathAppend Location Abs File # 
PathAppend Location Abs Dir # 
PathAppend Location Rel File # 
PathAppend Location Rel Dir # 
Eq (Location b t) # 

Methods

(==) :: Location b t -> Location b t -> Bool #

(/=) :: Location b t -> Location b t -> Bool #

Ord (Location b t) # 

Methods

compare :: Location b t -> Location b t -> Ordering #

(<) :: Location b t -> Location b t -> Bool #

(<=) :: Location b t -> Location b t -> Bool #

(>) :: Location b t -> Location b t -> Bool #

(>=) :: Location b t -> Location b t -> Bool #

max :: Location b t -> Location b t -> Location b t #

min :: Location b t -> Location b t -> Location b t #

Show (Location b t) # 

Methods

showsPrec :: Int -> Location b t -> ShowS #

show :: Location b t -> String #

showList :: [Location b t] -> ShowS #

Classes

class ToPath sym base type' | sym -> base type' where #

Convenience typeclass for symbolic, stringless routes - make an instance for your own data type to use your constructors as route-referencing symbols.

Minimal complete definition

toPath

Methods

toPath :: MonadThrow m => sym -> m (Path base type') #

class ToLocation sym base type' | sym -> base type' where #

Convenience typeclass for symbolic, stringless routes - make an instance for your own data type to use your constructors as route-referencing symbols.

Minimal complete definition

toLocation

Methods

toLocation :: MonadThrow m => sym -> m (Location base type') #

Combinators

Append

class PathAppend right base type' where #

Minimal complete definition

(</>)

Methods

(</>) :: Path base Dir -> right Rel type' -> right base type' #

Parent Accessors

addParent :: Location Rel t -> Location Rel t #

Prepend a parental accessor path - ../

Path

fromPath :: Path b t -> Location b t #

This should be your entry point for creating a Location.

File Extensions

Query Parameters

addQuery :: QueryParam -> Location b t -> Location b t #

Appends a query parameter

(<&>) :: Location b t -> QueryParam -> Location b t infixl 7 #

delQuery :: Location b t -> Location b t #

Fragment

(<#>) :: Location b t -> String -> Location b t infixl 8 #