Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. handleFormUploads :: MonadSnap m => UploadPolicy -> FileUploadPolicy -> (PartInfo -> InputStream ByteString -> IO a) -> m ([FormParam], [FormFile a])

    snap-core Snap.Util.FileUploads

    Processes form data and calls provided storage function on file parts. You can use this together with withTemporaryStore, storeAsLazyByteString or provide your own callback to store uploaded files. If you need to process uploaded file mime type or file name, do it in the store callback function. See also foldMultipart. Example using with small files which can safely be stored in memory.

    import qualified Data.ByteString.Lazy as Lazy
    
    handleSmallFiles :: MonadSnap m => [(ByteString, ByteString, Lazy.ByteString)]
    handleSmallFiles = handleFormUploads uploadPolicy filePolicy store
    
    where
    uploadPolicy = defaultUploadPolicy
    filePolicy = setMaximumFileSize (64*1024)
    $ setMaximumNumberOfFiles 5
    defaultUploadPolicy
    store partInfo stream = do
    content <- storeAsLazyByteString partInfo stream
    let
    fileName = partFileName partInfo
    fileMime = partContentType partInfo
    in (fileName, fileMime, content)
    

  2. setMaximumFormInputSize :: Int64 -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the maximum size of a form input which will be read into our rqParams map.

  3. setMaximumNumberOfFormInputs :: Int -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the maximum size of a form input which will be read into our rqParams map.

  4. setProcessFormInputs :: Bool -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the upload policy for treating parts without filenames as form input.

  5. X_Forwarded_For :: ProxyType

    snap-core Snap.Util.Proxy

    Use the Forwarded-For or X-Forwarded-For header

  6. transformBi :: Biplate from to => (to -> to) -> from -> from

    uniplate Data.Generics.Biplate

    No documentation available.

  7. transformBiM :: (Monad m, Biplate from to) => (to -> m to) -> from -> m from

    uniplate Data.Generics.Biplate

    No documentation available.

  8. transform :: Uniplate on => (on -> on) -> on -> on

    uniplate Data.Generics.Uniplate

    Transform every element in the tree, in a bottom-up manner. For example, replacing negative literals with literals:

    negLits = transform f
    where f (Neg (Lit i)) = Lit (negate i)
    f x = x
    

  9. transformM :: (Monad m, Uniplate on) => (on -> m on) -> on -> m on

    uniplate Data.Generics.Uniplate

    Monadic variant of transform

  10. data Transformer

    uniplate Data.Generics.Uniplate.Data

    No documentation available.

Page 584 of many | Previous | Next