Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readCookie :: (MonadSnap m, Readable a) => ByteString -> m a

    snap-core Snap.Core

    Gets the HTTP Cookie with the specified name and decodes it. If the decoding fails, the handler calls pass. Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> import qualified Snap.Test as T
    ghci> let cookie = Cookie "name" "value" Nothing Nothing Nothing False False
    ghci> let r = T.get "/foo/bar" M.empty >> T.addCookies [cookie]
    ghci> T.runHandler r (readCookie "name" >>= writeBS)
    HTTP/1.1 200 OK
    server: Snap/test
    date: Thu, 07 Aug 2014 12:20:09 GMT
    
    value
    

  2. readRequestBody :: MonadSnap m => Word64 -> m ByteString

    snap-core Snap.Core

    Returns the request body as a lazy bytestring. /Note that the request is not actually provided lazily!/ Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> import qualified Snap.Test as T
    ghci> let r = T.put "/foo" "text/plain" "some text"
    ghci> T.runHandler r (readRequestBody 2048 >>= writeLBS)
    HTTP/1.1 200 OK
    server: Snap/test
    date: Thu, 07 Aug 2014 20:08:44 GMT
    
    some text
    
    Since: 0.6

  3. readCookie :: (MonadSnap m, Readable a) => ByteString -> m a

    snap-core Snap.Internal.Core

    Gets the HTTP Cookie with the specified name and decodes it. If the decoding fails, the handler calls pass. Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> import qualified Snap.Test as T
    ghci> let cookie = Cookie "name" "value" Nothing Nothing Nothing False False
    ghci> let r = T.get "/foo/bar" M.empty >> T.addCookies [cookie]
    ghci> T.runHandler r (readCookie "name" >>= writeBS)
    HTTP/1.1 200 OK
    server: Snap/test
    date: Thu, 07 Aug 2014 12:20:09 GMT
    
    value
    

  4. readRequestBody :: MonadSnap m => Word64 -> m ByteString

    snap-core Snap.Internal.Core

    Returns the request body as a lazy bytestring. /Note that the request is not actually provided lazily!/ Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> import qualified Snap.Test as T
    ghci> let r = T.put "/foo" "text/plain" "some text"
    ghci> T.runHandler r (readRequestBody 2048 >>= writeLBS)
    HTTP/1.1 200 OK
    server: Snap/test
    date: Thu, 07 Aug 2014 20:08:44 GMT
    
    some text
    
    Since: 0.6

  5. read' :: forall (v :: Type -> Type -> Type) (n :: Natural) (k :: Nat) a m p . (KnownNat k, PrimMonad m, MVector v a) => MVector v ((n + k) + 1) (PrimState m) a -> p k -> m a

    vector-sized Data.Vector.Generic.Mutable.Sized

    O(1) Yield the element at a given type-safe position using Proxy.

  6. read' :: forall (n :: Natural) (k :: Nat) a m p . (KnownNat k, PrimMonad m) => MVector ((n + k) + 1) (PrimState m) a -> p k -> m a

    vector-sized Data.Vector.Mutable.Sized

    O(1) Yield the element at a given type-safe position using Proxy.

  7. read' :: forall (n :: Natural) (k :: Nat) a m p . (KnownNat k, PrimMonad m, Prim a) => MVector ((n + k) + 1) (PrimState m) a -> p k -> m a

    vector-sized Data.Vector.Primitive.Mutable.Sized

    O(1) Yield the element at a given type-safe position using Proxy.

  8. read' :: forall (n :: Natural) (k :: Nat) a m p . (KnownNat k, PrimMonad m, Storable a) => MVector ((n + k) + 1) (PrimState m) a -> p k -> m a

    vector-sized Data.Vector.Storable.Mutable.Sized

    O(1) Yield the element at a given type-safe position using Proxy.

  9. read' :: forall (n :: Natural) (k :: Nat) a m p . (KnownNat k, PrimMonad m, Unbox a) => MVector ((n + k) + 1) (PrimState m) a -> p k -> m a

    vector-sized Data.Vector.Unboxed.Mutable.Sized

    O(1) Yield the element at a given type-safe position using Proxy.

  10. readCurrentWordB :: BufferM YiString

    yi-core Yi.Buffer.HighLevel

    Reads in word at point.

Page 133 of many | Previous | Next