|
|
|
|
Synopsis |
|
io :: (Read a, Show a) => IO a -> CGI a | | feedback :: (CGIMonad cgi, Read a, Show a) => (a -> cgi a) -> a -> cgi a | | callWithCurrentHistory :: (CGIMonad cgi, Read a, Show a) => ((a -> cgi ()) -> a -> cgi ()) -> a -> cgi () | | once :: (CGIMonad cgi, Read a, Show a) => cgi a -> cgi a | | forever :: CGIMonad cgi => cgi () -> cgi () | | onceAndThen :: (CGIMonad cgi, Read a, Show a) => a -> cgi a -> cgi a | | unsafe_io :: IO a -> CGI a | | ask :: CGIMonad cgi => WithHTML x cgi a -> cgi () | | askResumptive :: CGIMonad cgi => WithHTML x cgi a -> cgi () | | askContinuously :: CGIMonad cgi => WithHTML x cgi a -> cgi () | | askOffline :: CGIMonad cgi => WithHTML x cgi a -> (Element -> IO ()) -> cgi () | | run :: CGI () -> IO () | | runWithOptions :: CGIOptions -> CGI () -> IO () | | runWithHook :: CGIOptions -> ([String] -> CGI ()) -> CGI () -> IO () | | makeServlet :: CGI () -> CGIProgram | | makeServletWithHook :: ([String] -> CGI ()) -> CGI () -> CGIProgram | | tell :: (CGIMonad cgi, CGIOutput a) => a -> cgi () | | tellContinuously :: (CGIMonad cgi, CGIOutput a) => a -> cgi () | | rawTellContinuously :: CGIOutput a => a -> CGIAction () | | htell :: CGIMonad cgi => WithHTML x IO () -> cgi a | | tellError :: String -> Element -> CGIAction a | | reportError :: String -> WithHTML x IO () -> CGIState -> IO (a, CGIState) | | backLink :: Monad m => HTMLCons x y m () | | hlink :: Monad m => URL -> HTMLCons x y m () | | frameTranslator :: CGIMonad cgi => ([String] -> cgi ()) -> [String] -> cgi () | | docTranslator :: [FreeForm] -> ([String] -> CGI ()) -> [String] -> CGI () | | lastTranslator :: [String] -> CGI () | | subVar :: String |
|
|
Documentation |
|
|
Safe embedding of an IO action into the CGI monad. Intentionally not
parameterized ver its monad to avoid its use inside of transactions.
|
|
|
Runs a CGI state transformer forever. Its specification is just
feedback f x = f x >>= feedback f
However, feedback is more efficient because it avoids the
buildup of long interaction logs by cutting back every time just before f
is invoked. Unfortunately, it's useless due to typing restrictions.
|
|
|
Control operator for the CGI monad. Its specification is
callWithCurrentHistory (\backto x -> action x >>= backto) x
==
action x >>= callWithCurrentHistory (\backto x -> action x >>= backto)
However, callWithCurrentHistory is more efficient because it avoids the
buildup of long interaction logs by cutting back every time just before
action gets executed.
|
|
|
Brackets a CGI action so that only its result is visible. Improves
efficiency by not executing the bracketed action after it has been performed
once. Use this for avoiding the inefficient buildup of long interaction logs.
|
|
|
Repeats a CGI action without saving its state so that the size of the
interaction log remains constant.
|
|
|
Unsafe variant of once: returns the computed value only the first time
and returns a default value in all later invocations.
[deprecated]
|
|
|
Directly lifts the IO monad into the CGI monad. This is generally unsafe
and should be avoided. Use io instead.
|
|
|
Takes a monadic value that constructs a HTML page and delivers this
page to the browser. This page may contain forms and input widgets.
|
|
|
Implementation of ask for the pure logged variant.
|
|
|
Experimental implementation of continuous version.
|
|
|
Like ask, but passes the constructed HTML page to the elementAction
parameter. This function may send the page via Email or store it into a
file. Anyone loading this page in a browser can resume the interaction.
|
|
|
Turns a CGI action into an IO action. Used to turn the main CGI action
into the main function of the program. Typical use:
main = run mainCGI
|
|
|
Turns a CGI action into an IO action. Used to turn the main CGI action
into the main function of the program. Takes additional low-level
options. Typical use:
main = runWithOptions [] mainCGI
|
|
|
Variant of run where an additional argument cgigen specifies an action
taken when the script is invoked with a non-empty query string as in
script-name?query-string
|
|
|
Transform a CGI action into a servlet suitable for running from Marlow's web
server.
|
|
|
Like makeServlet with additional CGI generator as in runWithHook.
|
|
|
Terminates script by sending its argument to the browser.
|
|
|
(experimental: continuous version) send argument to the browser.
|
|
|
|
|
Terminate script by sending a HTML page constructed by monadic argument.
|
|
|
|
|
|
|
Link to previous page in browser's history. Uses JavaScript.
|
|
|
Plain Hyperlink from an URL string.
|
|
|
|
|
A translator is a function [String] -> CGI (). It takes the query string
of the URL (of type [String]) and translates it into a CGI
action. docTranslator docs next
takes a list of FreeForm documents and a next translator. It tries to
select a document by its ffName and falls through to the
next translator if no document matches.
|
|
|
Terminates a sequence of translators.
|
|
|
Internal: name for the submission variable and form field
|
|
Produced by Haddock version 2.6.1 |