ngx-export-0.2.4.0: Helper module for Nginx haskell module

Copyright(c) Alexey Radkov 2016
LicenseBSD-style
Maintaineralexey.radkov@gmail.com
Stabilityexperimental
Portabilitynon-portable (requires POSIX)
Safe HaskellNone
LanguageHaskell98

NgxExport

Description

Export regular haskell functions for using in directives of nginx-haskell-module.

Synopsis

Documentation

module Foreign.C

ngxExportSS :: Name -> Q [Dec] Source #

Exports a function of type String -> String for using in directive haskell_run.

ngxExportSSS :: Name -> Q [Dec] Source #

Exports a function of type String -> String -> String for using in directive haskell_run.

ngxExportSLS :: Name -> Q [Dec] Source #

Exports a function of type [String] -> String for using in directive haskell_run.

ngxExportBS :: Name -> Q [Dec] Source #

Exports a function of type String -> Bool for using in directive haskell_run.

ngxExportBSS :: Name -> Q [Dec] Source #

Exports a function of type String -> String -> Bool for using in directive haskell_run.

ngxExportBLS :: Name -> Q [Dec] Source #

Exports a function of type [String] -> Bool for using in directive haskell_run.

ngxExportYY :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> ByteString for using in directive haskell_run.

ngxExportBY :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> Bool for using in directive haskell_run.

ngxExportAsyncIOYY :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> IO ByteString for using in directive haskell_run_async.

ngxExportServiceIOYY :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> Bool -> IO ByteString for using in directive haskell_run_service.

The boolean argument of the exported function marks that the service is being run for the first time.

ngxExportHandler :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> (ByteString, String, Int) for using in directives haskell_content and haskell_static_content.

The first element in the returned 3-tuple of the exported function is the content, the second is the content type, and the third is the HTTP status.

ngxExportDefHandler :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> ByteString for using in directives haskell_content and haskell_static_content.

ngxExportUnsafeHandler :: Name -> Q [Dec] Source #

Exports a function of type ByteString -> (ByteString, ByteString, Int) for using in directive haskell_unsafe_content.

The first element in the returned 3-tuple of the exported function is the content, the second is the content type, and the third is the HTTP status. Both the content and the content type are supposed to be referring to low-level string literals which do not need to be freed upon the request termination and must not be garbage-collected in the Haskell RTS.