happstack-server-7.5.4: Web related tools and services.

Safe HaskellNone
LanguageHaskell2010

Happstack.Server.SURI

Description

A wrapper and type class so that functions like seeOther can take a URI which is represented by a String, URI, or other instance of ToSURI.

Synopsis

Documentation

path :: SURI -> String Source #

Retrieves the path component from the URI

query :: SURI -> String Source #

Retrieves the query component from the URI

scheme :: SURI -> String Source #

Retrieves the scheme component from the URI

u_scheme :: (String -> String) -> SURI -> SURI Source #

Modifies the scheme component of the URI using the provided function

u_path :: (String -> String) -> SURI -> SURI Source #

Modifies the path component of the URI using the provided function

a_scheme :: String -> SURI -> SURI Source #

Sets the scheme component of the URI

a_path :: String -> SURI -> SURI Source #

Sets the path component of the URI

percentDecode :: String -> String Source #

percent decode a String

e.g. "hello%2Fworld" -> "hello/world"

isAbs :: SURI -> Bool Source #

Returns true if the URI is absolute

newtype SURI Source #

Constructors

SURI 

Fields

Instances
Eq SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

(==) :: SURI -> SURI -> Bool #

(/=) :: SURI -> SURI -> Bool #

Data SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SURI -> c SURI #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SURI #

toConstr :: SURI -> Constr #

dataTypeOf :: SURI -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SURI) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SURI) #

gmapT :: (forall b. Data b => b -> b) -> SURI -> SURI #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SURI -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SURI -> r #

gmapQ :: (forall d. Data d => d -> u) -> SURI -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SURI -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SURI -> m SURI #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SURI -> m SURI #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SURI -> m SURI #

Ord SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

compare :: SURI -> SURI -> Ordering #

(<) :: SURI -> SURI -> Bool #

(<=) :: SURI -> SURI -> Bool #

(>) :: SURI -> SURI -> Bool #

(>=) :: SURI -> SURI -> Bool #

max :: SURI -> SURI -> SURI #

min :: SURI -> SURI -> SURI #

Read SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Show SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

showsPrec :: Int -> SURI -> ShowS #

show :: SURI -> String #

showList :: [SURI] -> ShowS #

ToSURI SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: SURI -> SURI Source #

render :: ToSURI a => a -> String Source #

Render should be used for prettyprinting URIs.

parse :: String -> Maybe SURI Source #

Parses a URI from a String. Returns Nothing on failure.

class ToSURI x where Source #

Convenience class for converting data types to URIs

Methods

toSURI :: x -> SURI Source #

Instances
ToSURI String Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: String -> SURI Source #

ToSURI Text Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: Text -> SURI Source #

ToSURI Text Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: Text -> SURI Source #

ToSURI URI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: URI -> SURI Source #

ToSURI SURI Source # 
Instance details

Defined in Happstack.Server.SURI

Methods

toSURI :: SURI -> SURI Source #

class FromPath x where Source #

Methods

fromPath :: String -> x Source #