WashNGo-2.12: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell.ContentsIndex
WASH.CGI.CGIMonad
Description
Definition of the monad underlying the CGI library.
Synopsis
newtype CGI a = CGI {
unCGI :: (CGIAction a)
}
type CGIAction a = CGIState -> IO (a, CGIState)
data CGIState = CGIState {
inparm :: [PARAMETER]
outparm :: [PARAMETER]
stateID :: String
mcount :: Int
cgiInfo :: CGIInfo
pageInfo :: PageInfo
jsEnabled :: (Maybe Bool)
encoder :: (String -> String)
cookieMap :: [(String, (Maybe String, Maybe String))]
cookiesToSend :: [String]
}
data PageInfo = PageInfo {
count :: Int
nextaction :: (Element -> CGIAction ())
actionTable :: [(String, Element -> CGIAction ())]
bindings :: (Maybe CGIParameters)
enctype :: String
inFrame :: Int
allFields :: [(String, Bool)]
faultyfields :: [(String, String)]
}
data CGIFieldName = CGIFieldName {
fnMcount :: Int
fnCount :: Int
}
wrapIO :: IO a -> CGIAction a
lift :: IO a -> CGI a
setAction :: CGIMonad cgi => (Element -> cgi ()) -> cgi ()
registerAction :: CGIMonad cgi => String -> (Element -> cgi ()) -> cgi ()
incFrame :: CGIMonad cgi => cgi Int
resetFrame :: CGIMonad cgi => cgi ()
setEnctype :: CGIMonad cgi => String -> cgi ()
setFaulty :: CGIMonad cgi => [(String, String)] -> cgi ()
class Monad cgi => CGIMonad cgi where
wrapCGI :: CGIAction a -> cgi a
unwrapCGI :: cgi a -> CGIAction a
chooser :: a -> a -> cgi a
nextName :: CGIMonad cgi => cgi CGIFieldName
addField :: CGIMonad cgi => String -> Bool -> cgi ()
Documentation
newtype CGI a
Constructors
CGI
unCGI :: (CGIAction a)
show/hide Instances
type CGIAction a = CGIState -> IO (a, CGIState)
data CGIState
Constructors
CGIState
inparm :: [PARAMETER]
outparm :: [PARAMETER]
stateID :: String
mcount :: Int
cgiInfo :: CGIInfo
pageInfo :: PageInfo
jsEnabled :: (Maybe Bool)
encoder :: (String -> String)
cookieMap :: [(String, (Maybe String, Maybe String))]
cookiesToSend :: [String]
data PageInfo
Constructors
PageInfo
count :: Int
nextaction :: (Element -> CGIAction ())
actionTable :: [(String, Element -> CGIAction ())]
bindings :: (Maybe CGIParameters)
enctype :: String
inFrame :: Int
allFields :: [(String, Bool)]
faultyfields :: [(String, String)]
data CGIFieldName
Constructors
CGIFieldName
fnMcount :: Int
fnCount :: Int
show/hide Instances
wrapIO :: IO a -> CGIAction a
wrapper to transform IO computation to CGIAction
lift :: IO a -> CGI a
lift IO monad to CGI monad
setAction :: CGIMonad cgi => (Element -> cgi ()) -> cgi ()
registerAction :: CGIMonad cgi => String -> (Element -> cgi ()) -> cgi ()
incFrame :: CGIMonad cgi => cgi Int
resetFrame :: CGIMonad cgi => cgi ()
setEnctype :: CGIMonad cgi => String -> cgi ()
setFaulty :: CGIMonad cgi => [(String, String)] -> cgi ()
class Monad cgi => CGIMonad cgi where
Methods
wrapCGI :: CGIAction a -> cgi a
unwrapCGI :: cgi a -> CGIAction a
chooser :: a -> a -> cgi a
show/hide Instances
nextName :: CGIMonad cgi => cgi CGIFieldName
addField :: CGIMonad cgi => String -> Bool -> cgi ()
Produced by Haddock version 0.8