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

Safe HaskellNone
LanguageHaskell2010

Path.Extended

Contents

Synopsis

Types

data Location b t Source #

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

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 :: MonadThrow m => sym -> m (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 :: MonadThrow m => sym -> m (Location base type') 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.

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

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 #