Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
type family
Sequence_Sym1 (a6989586621680407148 :: t m a) :: m ()singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
singletons-base Prelude.Singletons No documentation available.
-
snap-core Snap.Core Contains all of the information about an incoming HTTP request.
getRequest :: MonadSnap m => m Requestsnap-core Snap.Core Grabs the Request object out of the Snap monad. Example:
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let r = T.get "/foo/bar" M.empty ghci> T.runHandler r (writeBS . rqURI =<< getRequest) HTTP/1.1 200 OK server: Snap/test date: Sat, 02 Aug 2014 07:51:54 GMT /foo/bar
getsRequest :: MonadSnap m => (Request -> a) -> m asnap-core Snap.Core Grabs something out of the Request object, using the given projection function. See gets. Example:
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let r = T.get "/foo/bar" M.empty ghci> T.runHandler r (writeBS =<< getsRequest rqURI) HTTP/1.1 200 OK server: Snap/test date: Sat, 02 Aug 2014 07:51:54 GMT /foo/bar
localRequest :: MonadSnap m => (Request -> Request) -> m a -> m asnap-core Snap.Core Runs a Snap action with a locally-modified Request state object. The Request object in the Snap monad state after the call to localRequest will be unchanged. Example:
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let r = T.get "/foo/bar" M.empty ghci> r' <- T.buildRequest $ T.get "/bar/foo" M.empty ghci> let printRqURI = getsRequest rqURI >>= writeBS >> writeBS "\n" ghci> T.runHandler r (printRqURI >> localRequest (const r') printRqURI) HTTP/1.1 200 OK server: Snap/test date: Wed, 06 Aug 2014 15:34:12 GMT /foo/bar /bar/foo
modifyRequest :: MonadSnap m => (Request -> Request) -> m ()snap-core Snap.Core Modifies the Request object stored in a Snap monad. Example:
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let r = T.get "/foo/bar" M.empty ghci> r' <- T.buildRequest $ T.get "/bar/foo" M.empty ghci> T.runHandler r (modifyRequest (const r') >> getsRequest rqURI >>= writeBS) HTTP/1.1 200 OK server: Snap/test date: Wed, 06 Aug 2014 15:24:25 GMT /bar/foo