úÎ7r5b     A . is responsible for maintaining the state for  K sequences for all users. To do this, it keeps for each user a session N object encapsulating their dialogues, and associates each user with their  session using cookies. A  represents a single user's active dialogs, which are M retained for an entire session. A reaper thread clears up sessions that I have not been touched for some session timeout, so each session also G stores the last time it was touched. In addition, each session is O associated with a fixed client address and cannot be used from a different $ client, which avoids hijacking.  A value of @ type represents a way of rendering a page, given a request URI V that should be used for subsequent requests in order to reassociate them with the  current dialogue.  A value of a 5 type represents a dialogue between the user and the D application, after which the application builds a value of type a. The O trivial case is that the value is already known. Alternatively, it may be N that there is some action to be performed, or else that the user needs to  be asked or told something. GConverts methods for rendering and parsing the result of a page into a   step. 3Determine whether a session is still valid or not. *Monadic while statement, for convenience.  Create a new ) to manage a set of dialogues in the web P application. This also spawns the session reaper, which cleans up sessions  that haven'(t been touched for a given time period. ECloses a DialogueManager, which will cause it to cease accepting any H incoming requests, and also to terminate the session reaper thread. Given a !< with a key type that can be randomly chosen, returns a key & that is not currently in the map. "Adds a 0 and associated cookie. This always sets a new L blank session, so should only be used when there is no session already. #Ensures that there is a # for the current user, and returns L it. Adds a blank one if necessary. This also updates the last touched I time for the session, preventing it from being removed by the reaper  thread for a while. $DA simple response that adds trailing slashes to a path when they don' t exist. U Trailing slashes are required for dialogue paths, since a path component is used $ to distinguish the dialogue ID. %Inverts a guard condition. The  function builds a &' that handles a given M dialogue. In general, it can be combined in normal ways with guards and : such, so long as changes in the request parameters won't cause it to be ? missed when future requests are made in the same dialogue.  +Wrapper type to present a list of options. The  < type class represents data that can be included in a form. Q To make it easy to compose several of these in a page, rendering and parsing Q are parameterized with prefix strings so that they may be made unique across  a page. The H function builds a user interaction to display and collect information. S In a finished web application, this should generally be replaced with a better S mechanism for rendering pages, such as a templating engine, XSLT, or something  of the sort.         (       !"#$%&'()*+)*+,happstack-dlg-0.1.2Happstack.Server.Dialogues#Happstack.Server.Dialogues.Scaffold#Happstack.Server.Dialogues.FormletsDialogueManagerPageDlgperformshowPagemakeDialogueManagercloseDialogueManagerdialogueChoice Scaffoldedrenderparse escapeHtmlscaffoldtoChoice fromChoice chooseFromshowFormsessionsopenDialogueSessionclient lastTouched dialoguesStepActionDone goodSessionwhileM uniqueKeycontainers-0.3.0.0Data.MapMapaddDialogueSessiongetDialogueSessionaddTrailingSlashnotGuardhappstack-server-0.4.1Happstack.Server.SimpleHTTP ServerPartT