path-extra-0.3.1: URLs without host information
Safe HaskellSafe-Inferred
LanguageHaskell2010

Path.Extended

Synopsis

Types

data Location base Source #

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

Instances

Instances details
Generic (Location base) Source # 
Instance details

Defined in Path.Extended

Associated Types

type Rep (Location base) :: Type -> Type #

Methods

from :: Location base -> Rep (Location base) x #

to :: Rep (Location base) x -> Location base #

Show (Location base) Source # 
Instance details

Defined in Path.Extended

Methods

showsPrec :: Int -> Location base -> ShowS #

show :: Location base -> String #

showList :: [Location base] -> ShowS #

Eq (Location base) Source # 
Instance details

Defined in Path.Extended

Methods

(==) :: Location base -> Location base -> Bool #

(/=) :: Location base -> Location base -> Bool #

Ord (Location base) Source # 
Instance details

Defined in Path.Extended

Methods

compare :: Location base -> Location base -> Ordering #

(<) :: Location base -> Location base -> Bool #

(<=) :: Location base -> Location base -> Bool #

(>) :: Location base -> Location base -> Bool #

(>=) :: Location base -> Location base -> Bool #

max :: Location base -> Location base -> Location base #

min :: Location base -> Location base -> Location base #

type Rep (Location base) Source # 
Instance details

Defined in Path.Extended

type Rep (Location base) = D1 ('MetaData "Location" "Path.Extended" "path-extra-0.3.1-Ao34vTbjrES4HuXcyPNMTw" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) (S1 ('MetaSel ('Just "locPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LocationPath base)) :*: (S1 ('MetaSel ('Just "locQueryParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [QueryParam]) :*: S1 ('MetaSel ('Just "locFragment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))))

data LocationPath base Source #

Constructors

Dir (Path base Dir) 
File (Path base File) 

Instances

Instances details
Generic (LocationPath base) Source # 
Instance details

Defined in Path.Extended

Associated Types

type Rep (LocationPath base) :: Type -> Type #

Methods

from :: LocationPath base -> Rep (LocationPath base) x #

to :: Rep (LocationPath base) x -> LocationPath base #

Show (LocationPath base) Source # 
Instance details

Defined in Path.Extended

Methods

showsPrec :: Int -> LocationPath base -> ShowS #

show :: LocationPath base -> String #

showList :: [LocationPath base] -> ShowS #

Eq (LocationPath base) Source # 
Instance details

Defined in Path.Extended

Methods

(==) :: LocationPath base -> LocationPath base -> Bool #

(/=) :: LocationPath base -> LocationPath base -> Bool #

Ord (LocationPath base) Source # 
Instance details

Defined in Path.Extended

Methods

compare :: LocationPath base -> LocationPath base -> Ordering #

(<) :: LocationPath base -> LocationPath base -> Bool #

(<=) :: LocationPath base -> LocationPath base -> Bool #

(>) :: LocationPath base -> LocationPath base -> Bool #

(>=) :: LocationPath base -> LocationPath base -> Bool #

max :: LocationPath base -> LocationPath base -> LocationPath base #

min :: LocationPath base -> LocationPath base -> LocationPath base #

type Rep (LocationPath base) Source # 
Instance details

Defined in Path.Extended

type Rep (LocationPath base) = D1 ('MetaData "LocationPath" "Path.Extended" "path-extra-0.3.1-Ao34vTbjrES4HuXcyPNMTw" 'False) (C1 ('MetaCons "Dir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Path base Dir))) :+: C1 ('MetaCons "File" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Path base File))))

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.

Methods

toPath :: sym -> Path base type' Source #

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

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

Methods

toLocation :: sym -> Location base Source #

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

Methods

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

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

Methods

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

Combinators

Path

fromDir :: Path base Dir -> Location base Source #

fromFile :: Path base File -> Location base Source #

Query Parameters

addQuery :: QueryParam -> Location base -> Location base Source #

Appends a query parameter

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

Fragment

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

Parser & Printer