path-extra-0.2.0: URLs without host information

Safe HaskellNone
LanguageHaskell2010

Path.Extended

Contents

Synopsis

Types

data Location #

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

Instances
Eq Location # 
Instance details

Defined in Path.Extended

Ord Location # 
Instance details

Defined in Path.Extended

Generic Location # 
Instance details

Defined in Path.Extended

Associated Types

type Rep Location :: * -> * #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

type Rep Location # 
Instance details

Defined in Path.Extended

type Rep Location = D1 (MetaData "Location" "Path.Extended" "path-extra-0.2.0-IkFEqDVc3DEEMBXbYhUA8K" False) (C1 (MetaCons "Location" PrefixI True) (S1 (MetaSel (Just "locPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Either (Path Abs Dir) (Path Abs File))) :*: (S1 (MetaSel (Just "locQueryParams") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [QueryParam]) :*: S1 (MetaSel (Just "locFragment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)))))

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

class ToLocation sym 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 :: sym -> Location #

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

Minimal complete definition

parsePath

Methods

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

class FromLocation sym where #

Minimal complete definition

parseLocation

Combinators

Path

Query Parameters

addQuery :: QueryParam -> Location -> Location #

Appends a query parameter

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

Fragment

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

Parser & Printer