Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- path :: SURI -> String
- query :: SURI -> String
- scheme :: SURI -> String
- u_scheme :: (String -> String) -> SURI -> SURI
- u_path :: (String -> String) -> SURI -> SURI
- a_scheme :: String -> SURI -> SURI
- a_path :: String -> SURI -> SURI
- percentDecode :: String -> String
- unEscape :: String -> String
- unEscapeQS :: String -> String
- isAbs :: SURI -> Bool
- newtype SURI = SURI {
- suri :: URI
- render :: ToSURI a => a -> String
- parse :: String -> Maybe SURI
- class ToSURI x where
- class FromPath x where
- fromPath :: String -> x
Documentation
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
percentDecode :: String -> String Source #
percent decode a String
e.g. "hello%2Fworld"
-> "hello/world"
unEscapeQS :: String -> String Source #
Instances
Eq SURI Source # | |
Data SURI Source # | |
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 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 # | |
Read SURI Source # | |
Defined in Happstack.Server.SURI | |
Show SURI Source # | |
ToSURI SURI Source # | |
Convenience class for converting data types to URIs
Instances
ToSURI String Source # | |
Defined in Happstack.Server.SURI | |
ToSURI Text Source # | |
Defined in Happstack.Server.SURI | |
ToSURI Text Source # | |
Defined in Happstack.Server.SURI | |
ToSURI URI Source # | |
Defined in Happstack.Server.SURI | |
ToSURI SURI Source # | |