path-extra-0.1.1: Some extensions to Chris Done's path library, for use with urlpath and attoparsec-uri.

Safe HaskellNone
LanguageHaskell2010

Path.Extended

Contents

Synopsis

Types

data Location b t Source #

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

Constructors

Location 

Fields

Classes

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

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 :: sym -> Path base type' Source #

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

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 :: sym -> Location base type' Source #

class FromPath sym base type' | sym -> base type' where Source #

Minimal complete definition

parsePath

Methods

parsePath :: Path base type' -> Either String sym Source #

class FromLocation sym base type' | sym -> base type' where Source #

Minimal complete definition

parseLocation

Methods

parseLocation :: Location base type' -> Either String sym Source #

Combinators

Append

Parent Accessors

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

Prepend a parental accessor path - ../

Path

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

This should be your entry point for creating a Location.

File Extensions

Query Parameters

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

Appends a query parameter

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

Fragment

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