WashNGo- WASH is a family of EDSLs for programming Web applications in Haskell.




historyTimeout :: IntSource

standard value for timeout of interaction threads: one hundred seconds

type StateID = (String, String)Source

comprises the name of the application and a hash value.

data TableEntry Source




myID :: StateID

script name and hash key

parentID :: Maybe StateID

root has no parent

nextparm :: PARAMETER
timeout :: Int

timeout for this stage of interaction

threads :: MVar [MVar (CGIParameters, Handle)]

next round of parameters and output handle

createEntry :: StateID -> Maybe StateID -> PARAMETER -> Maybe Int -> IO ()Source

Takes the id of the current node, the id of the father node (if any), the current parameter, and (perhaps) a timeout value for the current interaction and enters a corresponding record into the history table.

readParameters :: StateID -> IO (CGIParameters, Handle)Source

Suspends the current thread by waiting on an entry with the current node's id. Returns the parameters passed to this node.

notify :: StateID -> CGIParameters -> Handle -> IO BoolSource

Attempts to pass parameters and a handle to a thread waiting for the given stateID. Returns True if successful and False if no such thread was found.