8?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None      None Ya Token identifies a flow that handle messages. The scheduler compose a Token with every  C message that arrives and send the mesage to the appropriate flow. JList of (wfname, workflow) pairs, to be scheduled depending on the message' s pwfname The anonymous user ! It is the path of the root flow "send a complete response %send :: Token -> HttpData -> IO() $Qsend a response fragment. Useful for streaming. the last packet must sent trough " *Texecutes a simple monadic computation that receive the params and return a response It is used with ,  There is a higuer level version  wstateless in  MFLow.Forms +HExecutes a monadic computation that send and receive messages, but does X not store its state in permanent storage. The process once stopped, will restart anew ,Fadd a list of flows to be scheduled. Each entry in the list is a pair  (path, flow) -!return the list of the scheduler .)The scheduler creates a Token with every  ^ message that arrives and send the mesage to the appropriate flow, then waht for the response  and return it. *It is the core of the application server.  MFLow.Wai and  MFlow.Hack use it /The handler of the error log 0 set the 404  not found response 2OWrites a XML tag in a ByteString. It is the most basic form of formatting. For % more sophisticated formatting , use MFlow.Forms.XHtml or MFlow.Forms.HSP. 3  bhtml ats v= btag "html" ats v 4  bbody ats v= btag "body" ats v 6XSet the path of the files in the web server. The links to the files are relative to it. 4 The files are cached (memoized) according with the  Data.TCache; policies in the program space. This avoid the blocking of O the efficient GHC threads by frequent IO calls.So it enhances the performance & in the context of heavy concurrence.  It uses   . # The caching-uncaching follows the  criteria N  !"#$%&'()*+,-./012345678/  !"#$%&'()*+,-./012345678/ '&()"#$%,-+* !/01234 56.78<   !"#$%&'()*+,-./012345678 None:a server procedure ;!a string with a valid JavaScript < a String with a CSS description =a CSS file URL >>Script URL and the list of scripts to be executed when loaded ASMinimal interface for defining the basic form combinators in a concrete rendering.  defined in this module. see MFlow.Forms.XHtml for the instance for  Text.XHtml% and MFlow.Forms.HSP for an instance  form Haskell Server Pages.  Return the key name of an user ZRegister an user/ password [Authentication against Z ed users.  to be used with validate `LUse this instead of return to return from a computation with ask statements TThis way when the user press the back button, the computation will execute back, to 8 the returned code, according with the user navigation. a@Execute the widget in a monad and return the result in another. b5Set user-defined data in the context of the session. _The data is indexed by type in a map. So the user can insert-retrieve different kinds of data  in the session context. This example define  addHistory and  getHistory2 to maintain a Html log in the session of a Flow: 5 newtype History = History ( Html) deriving Typeable 0 setHistory html= setSessionData $ History html ] getHistory= getSessionData `onNothing` return (History mempty) >>= \(History h) -> return h  addHistory html= do  html' <- getHistory ( setHistory $ html' `mappend` html c:Get the session data of the desired type if there is any. d-Return the user language. Now it is fixed to en ePSet the header-footer that will enclose the widgets. It must be provided in the b same formatting than them, altrough with normalization to byteStrings any formatting can be used 2This header uses XML trough Haskell Server Pages ( &http://hackage.haskell.org/package/hsp)    setHeader $ c ->  <html>  <head>  <title> my title </title>  < meta name= "Keywords" content= "sci-fi" />)  </head>  < body style= "margin-left:5%;margin-right:5%">  <% c %>  </body>  </html> This header uses  Text.XHtml    setHeader $ c ->  thehtml  << (header  << (thetitle << title +++  meta ! [name "Keywords" ,content "sci-fi"])) +++  body ! [style "margin-left:5%;margin-right:5%"] c /This header uses both. It uses byteString tags   setHeader $ c ->  3 [] $  2 head [] $  (B (thetitle << title)   B  meta(name= \"Keywords\" content= \"sci-fi\" /)   4 [("style", "margin-left:5%;margin-right:5%")] c fReturn the current header gSet an HTTP cookie Set an HTTP Response header hJSet 1) the timeout of the flow execution since the last user interaction. K Once passed, the flow executes from the begining. 2). In persistent flows K it set the session state timeout for the flow, that is persistent. If the + flow is not persistent, it has no effect. + flows restart anew.  persistent flows (that use 3) restart at the las saved execution point, unless , the session time has expired for the user. knCached widgets operate with widgets in the Identity monad, but they may perform IO using the execute instance B of the monad m, which is usually the IO monad. execute basically " sanctifies"4 the use of unsafePerformIO for a transient purpose % such is caching. This is defined in Data.TCache.Memoization . The programmer can create his  own instance for his monad. With k] it is possible to cache the rendering of a widget as a ByteString (maintaining type safety) , permanently or for a certain time. this is very useful for complex widgets that present information. Specially it they must access to databases.    import MFlow.Wai.XHtm.All  import Some.Time.Library " addMessageFlows [(noscript, time)]  main= run 80 waiMessageFlow  time=do ask $ cachedWidget "time" 5  $ wlink () bold << " the time is "" ++ show (execute giveTheTime) ++ " click here"  time [this pseudocode would update the time every 5 seconds. The execution of the IO computation Z giveTheTime must be executed inside the cached widget to avoid unnecesary IO executions. -NOTE: cached widgets are shared by all users lA shorter name for k mUnlike k7, which cache the rendering but not the user response, wfreeze ] cache also the user response. This is useful for pseudo-widgets which just show information k while the controls are in other non freezed widgets. A freezed widget ever return the first user response  It is faster than k. - It is not restricted to the Identity monad. -NOTE: cached widgets are shared by all users nExecute the Flow, in the  FlowM view m# monad. It is used as parameter of hackMessageFlow waiMessageFlow or , OThe flow is executed in a loop. When the flow is finished, it is started again  main= do  addMessageFlows [("noscript",transient $ runFlow mainf)] $ forkIO . run 80 $ waiMessageFlow  adminLoop oClears the environment qURun a persistent flow inside the current flow. It is identified by the procedure and  the string identifier. T unlike the normal flows, that are infinite loops, runFlowIn executes a finite flow P once executed, in subsequent executions the flow will return the stored result 0 without asking again. This is useful for askingstoring(retrieving user defined configurations. sVRequirements are javascripts, Stylesheets or server processes (or any instance of the ! class) that are included in the 9 Web page or in the server when a widget specifies this. requires is the 7 procedure to be called with the list of requirements. V Varios widgets in the page can require the same element, MFlow will install it once. 9:;<=>?@ABCDEFGHIJKLMNOP  Q    R!"STUVW#$%&'X()*+,-.Y/01234Z[56\]789^_`:;a<bcd=>?efgname value path 1Max-Age in seconds. Nothing for a session cookie name value h@ijk/The key of the cached object for the retrieval /Timeout of the caching. Zero means sessionwide )The cached widget, in the Identity monad The cached result l/The key of the cached object for the retrieval /Timeout of the caching. Zero means sessionwide )The cached widget, in the Identity monad The cached result m/The key of the cached object for the retrieval /Timeout of the caching. Zero means sessionwide The cached widget The cached result nopAqrBsCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a9:;<=>?@ABCDEFGHIJKLMNOP  Q    R!"STUVW#$%&'X()*+,-.Y/01234Z[56\]789^_`:;a<bcd=>?efgh@ijklmnopAqrBsCDEFGHIc9>=<;:?@ABCDEFGHIJKLMNOP  Q    R!"STUVW#$%&'X*)(+,-.Y/01234Z[56\]789^_`:;a<bcd=>?efgh@ijklmnopAqrBsCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aNone=tAValidates a form or widget result against a validating procedure getOdd= getInt Nothing t (x3 -> return $ if mod x 2==0 then Nothing else Just only odd numbers, please)uDActions are callbacks that are executed when a widget is validated. _ It is useful when the widget is inside widget containers that know nothing about his content. IIt returns a result that can be significative or, else, be ignored with  and . D An action may or may not initiate his own dialog with the user via  w'Display a text box and return a String xhDisplay a text box and return an Integer (if the value entered is not an Integer, fails the validation) y_Display a text box and return a Int (if the value entered is not an Int, fails the validation) zDisplay a password box {=Implement a radio button that perform a submit when pressed. . the parameter is the name of the radio group |Implement a radio button . the parameter is the name of the radio group ~cDisplay a text box and return the value entered if it is readable( Otherwise, fail the validation) PRead the checkboxes dinamically created by JavaScript within the view parameter  see for example selectAutocomplete in MFlow.Forms.Widgets PGenerate a new string. Useful for creating tag identifiers and other attributes 4Display a multiline text box and return its content VDisplay a dropdown box with the two values (second (true) and third parameter(false)) E . With the value of the first parameter selected. VDisplay a dropdown box with the options in the first parameter is optionally selected $ . It returns the selected option. <Set the option for getSelect. Options are concatenated with  ESet the selected option for getSelect. Options are concatenated with  'Enclose Widgets within some formating.  view7 is intended to be instantiated to a particular format FThis is a widget, which is a table with some links. it returns an Int it has a infix priority : infixr 5 less than % so use parenthesis when appropriate  import MFlow.Forms.Blaze.Html   tableLinks :: View Html Int J table ! At.style "border:1;width:20%;margin-left:auto;margin-right:auto" 1 <<< caption << text "choose an item" \ ++> thead << tr << ( th << b << text "item" <> th << b << text "times chosen")  ++> (tbody 8 <<< tr ! rowspan "2" << td << linkHome  ++> (tr <<< td <<< wlink IPhone (b << text "iphone") <++ td << ( b << text (fromString $ show ( cart V.! 0)))  <|> tr <<< td <<< wlink IPod (b << text "ipad") <++ td << ( b << text (fromString $ show ( cart V.! 1)))  <|> tr <<< td <<< wlink IPad (b << text "ipod") <++ td << ( b << text (fromString $ show ( cart V.! 2))))  ) :Useful for the creation of pages using two or more views.  For example HSP and Html. J Because both have ConvertTo instances to ByteString, then it is possible  to mix them via j:  ) normalize widget <+> normalize widget' is equivalent to  widget .<+>. widget' #Append formatting code to a widget   getString hi <++ H1 << hi thereIt has a infix prority: infixr 6 higuer that  and most other operators $Prepend formatting code to a widget  bold  <"enter name" ++ getString NothingIt has a infix prority: infixr 6 higuer that  and most other operators .Add attributes to the topmost tag of a widget it has a fixity infix 8 Is an example of login/#register validation form needed by . In this case [ the form field appears in a single line. it shows, in sequence, entries for the username, T password, a button for loging, a entry to repeat password necesary for registering  and a button for registering. & The user can build its own user login/+validation forms by modifying this example  userFormLine=  (User <$> getString (Just " enter user") <*> getPassword <+> submitButton "login")  <+> fromStr " password again" +> getPassword <* submitButton "register" Example of user/.password form (no validation) to be used with  1Empty widget that return Nothing. May be used as " empty boxes" inside larger widgets (Render a Show-able value and return it DRender raw view formatting. It is useful for displaying information *Wether the user is logged or is anonymous "It creates a widget for user login/)registering. If a user name is specified . in the first parameter, it is forced to login/ password as this specific user. M If this user was already logged, the widget return the user without asking. T If the user press the register button, the new user-password is registered and the  user logged. change the user 0It is supposed that the user has been validated $logout. The user is resetted to the   user 8If not logged, perform login. otherwise return the user +getUserSimple= getUser Nothing userFormLine@Very basic user authentication. The user is stored in a cookie. A it looks for the cookie. If no cookie, it ask to the user for a Zed  user-password combination. P The user-password combination is only asked if the user has not logged already - otherwise, the stored username is returned. )getUser mu form= ask $ userWidget mu formb"Join two widgets in the same page  the resulting widget, when 9ed with it, return a 2 tuple of their validation results * if both return Noting, the widget return Nothing (invalid). it has a low infix priority: infixr 2  r <- ask widget1 <+> widget2 # case r of (Just x, Nothing) -> .. "Join two widgets in the same page  the resulting widget, when 9ed with it, return a 2 tuple of their validation results * if both return Noting, the widget return Nothing (invalid). it has a low infix priority: infixr 2  r <- ask widget1 <+> widget2 # case r of (Just x, Nothing) -> .. \The first elem result (even if it is not validated) is discarded, and the secod is returned / . This contrast with the applicative operator c% which fails the whole validation if ) the validation of the first elem fails. BThe first element is displayed however, as happens in the case of c . Here w's are widgets and r's are returned values (w1 <* w2) will return Just r1! only if w1 and w2 are validated (w1 <** w2) will return Just r1 even if w2 is not validated it has a low infix priority: infixr 1 ]The second elem result (even if it is not validated) is discarded, and the first is returned / . This contrast with the applicative operator c% which fails the whole validation if * the validation of the second elem fails. < The second element is displayed however, as in the case of .  see the  examples it has a low infix priority: infixr 1 -for compatibility with the same procedure in   . ! This is the non testing version   askt v w= ask w hide one or the other )It is the way to interact with the user. / It takes a widget and return the user result. 'If the widget is not validated (return Nothing), the page is presented again ^If the environment has the parameters being looked at, as a result of a previous interaction,  it will not ask to the user. % To force asking in any case, put an o statement before \True if the flow is going back (as a result of the back button pressed in the web browser). P Usually this chech is nos necessary unless conditional code make it necessary   menu= do  mop <- getGoStraighTo  case mop of  Just goop -> goop  Nothing -> do  r <-  option1 < |> option2  case r of < op1 -> setGoStraighTo (Just goop1) >> goop1 ; op2 -> setGoStraighTo (Just goop2) >> goop2[This pseudocode below would execute the ask of the menu once. But the user will never have Q the possibility to see the menu again. To let him choose other option, the code  has to be change to   menu= do  mop <- getGoStraighTo  back <-   case (mop,back) of " (Just goop,False) -> goop  _ -> do  r <-  option1 < |> option2  case r of < op1 -> setGoStraighTo (Just goop1) >> goop1 ; op2 -> setGoStraighTo (Just goop2) >> goop2WHowever this is very specialized. Normally the back button detection is not necessary. ` In a persistent flow (with step) even this default entry option would be completely automatic, S since the process would restar at the last page visited. No setting is necessary. 2Will prevent the backtrack beyond the point where  is located. _ If the user press the back button beyond that point, the flow parameter is executed, usually t it is an ask statement with a message. If the flow is not going back, it does nothing. It is a cut in backtracking [It is useful when an undoable transaction has been commited. For example, after a payment. IThis example show a message when the user go back and press again to pay 8 ask $ wlink () << b << "press here to pay 100000 $ "  payIt @ preventGoingBack . ask $ b << "You paid 10000 $ one time" ] ++> wlink () << b << " Please press here to complete the proccess" { ask $ wlink () << b << "OK, press here to go to the menu or press the back button to verify that you can not pay again"  where " payIt= liftIO $ print "paying" Creates a stateless flow (see *2) whose behaviour is defined as a widget. It is a " higuer level form of the latter "transfer control to another flow. <Wrap a widget of form element within a form-action element. LInstall the server code and return the client code for an AJAX interaction. LThis example increases the value of a text box each time the box is clicked  ask $ do > let elemval= "document.getElementById('text1').value" Z ajaxc <- ajax $ \n -> return $ elemval <> "='" <> B.pack(show(read n +1)) <> "'" # b << text "click the box" M ++> getInt (Just 0) <! [("id","text1"),("onclick", ajaxc elemval)] Send the javascript expression, generated by the procedure parameter as a ByteString, execute it in the browser and the result is returned back The ajaxSend6 invocation must be inside a ajax procedure or else a No ajax session set error will be produced Like ajaxSend but the result is ignored ICreates a link wiget. A link can be composed with other widget elements, [When some user interface int return some response to the server, but it is not produced by 1 a form or a link, but for example by an script,  returning notify the type checker. EAt runtime the parameter is read from the environment and validated. ^. The parameter is the visualization code, that accept a serialization function that generate V the server invocation string, used by the visualization to return the value by means  of a link or a window.location statement in javasCript OConcat a list of widgets of the same type, return a the first validated result 6from a list of widgets, it return the validated ones. SIntersperse a widget in a list of widgets. the results is a 2-tuple of both types. it has a infix priority infixr 5 aPut a widget before and after other. Useful for navigation links in a page that appears at toAdd  and at the bottom of a page. AFlatten a binary tree of tuples of Maybe results produced by the < +> operator ? into a single tuple with the same elements in the same order. 2 This is useful for easing matching. For example:   res <- ask $ wlink1 <+> wlink2 wform < +> wlink3 < +> wlink4res has type:  GMaybe (Maybe (Maybe (Maybe (Maybe a,Maybe b),Maybe c),Maybe d),Maybe e)but  flatten res has type: . (Maybe a, Maybe b, Maybe c, Maybe d, Maybe e) ! (.<<.) w x = w $ toByteString x + (.<+>.) x y = normalize x <+> normalize y / (.|*>.) x y = normalize x |*> map normalize y + (.|+|.) x y = normalize x |+| normalize y + (.**>.) x y = normalize x **> normalize y + (.<**.) x y = normalize x <** normalize y * (.<|>.) x y= normalize x <|> normalize y - (.<++.) x v= normalize x <++ toByteString v - (.++>.) v x= toByteString v ++> normalize x ddefghijklmnopqrstuvwxyz{|}~tuvbwxuser defined procedure, executed in the server.Receives the value of the javascript expression and must return another javascript expression that will be executed in the web browser returns a function that accept a javascript expression and return a javascript event handler expression that invoques the ajax server procedure yz{|}~2349:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWABCDEFGHIJKLMNOPZ[\]idYowyxz}|{~tuvklm234jnpqr`ebcfhg?@9>=<;:saX^_Q_defghijklmnopqrstuvwxyz{|}~tuvbwxyz{|}~NoneVused to insert html elements within a tag with the appropriate infix priority for the  other operators used in MFlow NoneNone0A small console interpreter with some commands:  sync4 Synchronize the cache with persistent storage (see ) flush Flush the cache end Synchronize and exit abort Exit. Do not synchronize 8on exception, for example Control-c, it sync and exits. > It must be used as the last statement of the main procedure. 3execute the process and wait for its finalization. ! then it synchronizes the cache 7Install the admin flow in the list of flows handled by HackMessageFlow @ this gives access to an administrator page. It is necessary to  create an admin user with \. 1The administration page is reached with the path " adminserv"  None_Present a user form if not logged in. Otherwise, the user name and a logout link is presented. 2 The paremeters and the behaviour are the same as .  Only the display is different ?Display a logout link if the user is logged. Nothing otherwise WReturn the list of edited widgets (added by the active widgets) for a given identifier nDeletes the list of edited widgets for a certain identifier and with the type of the witness widget parameter XReturn the javascript to be executed on the browser to prepend a widget to the location o identified by the selector (the bytestring parameter), The selector must have the form of a jquery expression I . It stores the added widgets in the edited list, that is accessed with  5The resulting string can be executed in the browser.  will return the code to ] execute the complete ajax roundtrip. This code returned by ajax must be in an eventhabdler. TThis example code will insert a widget in the div when the element with identifier   clickelemH is clicked. when the form is sbmitted, the widget values are returned - and the list of edited widgets are deleted.  id1<- genNewId + let sel= "$('#" <> B.pack id1 <> "')" 4 callAjax <- ajax . const $ prependWidget sel wn 7 let installevents= "$(document).ready(function(){\ J \$('#clickelem').click(function(){"++callAjax "''"++"});})"  9 requires [JScriptFile jqueryScript [installevents] ]  ws <- getEdited sel / r <- (div <<< manyOf ws) <! [("id",id1)]  delEdited sel ws'  return r Like + but append the widget instead of prepend. L ike M but set the entire content of the selector instead of prepending an element UInside a tag, it add and delete widgets of the same type. When the form is submitted J or a wlink is pressed, this widget return the list of validated widgets. q the event for adding a new widget is attached , as a click event to the element of the page with the identifier  wEditListAdd  that the user will choose. NThis example add or delete editable text boxes, with two initial boxes with  hi,  how are you as values. Tt uses blaze-html: [Present an autocompletion list, from a procedure defined by the programmer, to a text box. PProduces a text box. It gives a autocompletion list to the textbox. When return Y is pressed in the textbox, the box content is used to create a widget of a kind defined t by the user, which will be situated above of the textbox. When submitted, the result of this widget is the content . of the created widgets (the validated ones). , is an specialization of this widget, where Y the widget parameter is fixed, with a checkbox that delete the eleement when unselected / . This fixed widget is as such (using generic FormElem class tags): ' ftag "div" <<< ftag "input" mempty < `attrs` [("type","checkbox") 7 ,("checked","") o ,("onclick","this.parentNode.parentNode.removeChild(this.parentNode)")] 7 ++> ftag "span" (fromStr $ fromJust x ) ( ++> whidden( fromJust x) A specialization of selectAutocompleteEdit, which make appear each option choosen with s a checkbox that deletes the element when uncheched. The result, when submitted, is the list of selected elements. OA widget that display the content of an html, But if logged as administrator, N it permits to edit it in place. So the editor could see the final appearance  of what he write in the page. OWhen the administrator double click in the paragraph, the content is saved and L identified by the key. Then, from now on, all the users will see the saved & content instead of the code content. +The content is saved in a file by default (texts! in this versions), but there is  a configurable version (1). The content of the element and the formatting C is cached in memory, so the display is, theoretically, very fast. XTHis is an example of how to use the content management primitives (in demos.blaze.hs):  textEdit= do ' setHeader $ \t -> html << body << t   let first= p << i << 9 (El.span << text "this is a page with" H <> b << text " two " <> El.span << text "paragraphs")  R second= p << i << text "This is the original text of the second paragraph"  1 pageEditable = (tFieldEd "first" first) 2 **> (tFieldEd "second" second)   ask $ first  ++> second 8 ++> wlink () (p << text "click here to edit it")  > ask $ p << text "Please login with admin/admin to edit it" 3 ++> userWidget (Just "admin") userLogin  A ask $ p << text "now you can click the field and edit them" I ++> p << b << text "to save the edited field, double click on it"  ++> pageEditable H **> wlink () (p << text "click here to see it as a normal user")   logout  I ask $ p << text "the user sees the edited content. He can not edit"  ++> pageEditable 4 **> wlink () (p << text "click to continue")   ask $ p << text "When text are fixed,the edit facility and the original texts can be removed. The content is indexed by the field key"  ++> tField "first"  **> tField "second" b **> p << text "End of edit field demo" ++> wlink () (p << text "click here to go to menu") Like ! with user-configurable storage. 5Read the field value and present it without edition. 6A multilanguage version of tFieldEd. For a field with key it add a suffix with the & two characters of the language used. "A multilanguage version of tField $present a calendar to choose a date # identifier withess jquery selector widget to prepend Estring returned with the jquery string to be executed in the browser The holder tag /the contained widget, initialized by a string The initial list of values. NThe id of the button or link that will create a new list element when clicked Initial value MAutocompletion procedure: will receive a prefix and return a list of strings the initial text of the box Kthe autocompletion procedure: receives a prefix, return a list of options. Bthe widget to add, initialized with the string entered in the box initial set of values resulting widget !the read procedure, user defined "the write procedure, user defiend "None  None6  !"#$%&'()*+,-./012345678Nonec      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| }  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None*c'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{~      !"#$%&'()*+,-./0123456  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None:run a list of flows with a number of simultaneous threads Finject substitutes an expression by other. It may be used to override R ask interaction with the user. It should bee used infix for greater readability:  + ask something `inject` const someother (The parameter passed is the test number J if the flow has not been executed by runTest, inject return the original Ja simulated ask that generate simulated user input of the type expected. FIt forces the web page rendering, since it is monadic and can contain - side effects and load effects to be tested. it is a substitute of  from  MFlow.Forms for testing purposes. $instead of generating a result like -, the result is given as the first parameter * so it does not need a Generate instance. HIt forces the web page rendering, since it is monadic so it can contain - side effects and load effects to be tested. 79verify a property. if not true, throw the error message. IIt is intended to be used in a infix notation, on the right of the code, U in order to separate the code assertions from the application code and make clearly * visible them as a form of documentation.  separated from it:  K liftIO $ print (x :: Int) `verify` (return $ x > 10, "x < = 10") Ythe expression is monadic to allow for complex verifications that may involve IO actions a pure version of verifyM 89:7;<=>?@AB 89:7;<=>?@ABC  !"#$%&'()*+,-./.0123456789:;<=>?@ABCDEFGHIJK L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f f g h h i j k l m n o p q r s t u v w x y z { | } ~                   d           ! " # $ % & ' ( ) * + e , - . / / 0 1 2 3 4 4 5 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f ghijklmnopqqrrssttuvwxyz{|}~                                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0./1./2./3./456756856956:56;56<56=56>56?56@56A56B56C56D56E56F56G56H56H56I56J56K56L56M56N56O56O56P56Q56R56S56TUVWUVXUVYUVZUV[UV\U]^U_`UabUacUadUaeUafUagUahUaiUajUakUalUamUanUaoUpqUprUpsUptUpuUpvUpwUpxUpyUpzUp{Up|Up}Up~UpUpUpUUUUUUUUUM B%()*+,-./123679@ADEGHKPQRUV[]_`abcdeiquvxy|{}~& !() u MFlow-0.2.0.7 MFlow.Forms MFlow.CookiesMFlowMFlow.Forms.Blaze.HtmlMFlow.Forms.AdminMFlow.Forms.Widgets MFlow.WaiMFlow.Forms.Test Data.TCache MemoizationMFlow.Forms.InternalsMFLow.Forms.TextasktMFlow.Forms.XHtmlMFlow.Wai.ResponseMFlow.Wai.Blaze.Html.AllMFlow.Wai.XHtml.AllbaseControl.Applicative<*<*><|> Data.Functor<$>Cookie contentHtml cookieuser getCookies cookieHeaders urlDecodeAttribsTokentwfnametusertindtenvtsendqtrecq Processablepwfnamepuserpind getParamsParamsProcListHttpDataErrorFlowaddTokenToListdeleteTokenInList anonymousnoScriptsend sendFlush sendFragmentsendEndFragmentreceiveflushRec receiveReqreceiveReqTimeout stateless transientaddMessageFlowsgetMessageFlows msgSchedulerhlogsetNotFoundResponsegetNotFoundResponsebtagbhtmlbbodyaddAttrs setFilesPath serveFilenewFlowWebRequirement ServerProcJScriptCSSCSSFile JScriptFile RequirementsinstallRequirements FormInput toByteString toHttpDatafromStrfromStrNoEncodeftaginredflinkflink1finput ftextareafselectfoptionfoption1 formActionattrs MFlowStateFlowMViewrunViewFormElmFailBackuserName userRegister userValidate setAdminUser getAdminName fromFailBack toFailBackbreturn changeMonadsetSessionDatagetSessionDatagetLang setHeader getHeader setCookie setTimeoutsgetCurrentUser normalize cachedWidgetwcachedwfreezerunFlowclearEnv runFlowOnce runFlowInsteprequiresvalidatewactionwmodify getString getIntegergetInt getPasswordsetRadioActivesetRadiogetRadio setCheckBox genCheckBoxeswhidden getCheckBoxes getTextBoxgenNewIdgetMultilineTextgetBool getSelect setOptionsetSelectedOption<<<<++++>**><**ask goingBackpreventGoingBack wstatelesstransferwform resetButton submitButtonajaxajaxSend ajaxSend_wlink returningfirstOfmanyOf>:>|*>|+|flatten.<<..<+>..|*>..|+|..**>..<**..<|>..<++..++>.<< adminLoopwait addAdminWFuserFormOrName maybeLogout getEdited delEdited prependWidget appendWidget setWidget wEditList wautocompletewautocompleteEditwautocompleteListtFieldEd tFieldGentFieldmFieldEdmFieldwaiMessageFlowGenerategeneraterunTestrunTest1injectverify showCookie splitCookiesreadEnv urlEncodedextrasafe hexadecimalTCache-0.10.2.0Data.TCache.Defs setPersistNFlowRespEndFragmFragmReq iorefqmapgetTokenfromReq delMsgHistory _messageFlowsthreadtellToWFlogError logFileNamedefNotFoundResponsenotFoundResponse rfilesPathrflow mimeTable$fIndexableNFlow$fSerializableNFlow$fSerializableToken $fReadToken $fShowToken$fIndexableToken$fProcessableReq$fProcessableToken$fMonoidHttpData keyUserNamebytestring-0.10.0.2Data.ByteString.Lazyappend setHttpHeaderWorkflow-0.8.0.7Control.Workflow RequirementOnClickCheckedValueTypeNameVoid mfSequencemfCachedprevSeqonInitinSyncmfLangmfEnvneedFormmfToken mfkillTime mfSessionTime mfCookies mfHttpHeadersmfHeadermfDebugmfRequirementsmfDatamfAjax mfSeqCachenotSyncInActionLangrunFlowMFlowMMWStateBackTrunBackTGoBackNoBack BackPointConfigUser upassword PasswdStrUserStreUsererror1 userPrefix keyConfigrconf iCanFailBack repeatPlease noFailBack liftBackTflowM mFlowState0getEnv stdHeader getWFName runFlowOnce1 getParam1installAllRequirements loadjsfileloadjs loadcssfileloadcssinstallWebRequirements ajaxScript$fRequirementsWebRequirement $fShow(,)$fOrd(,)$fEq(,) $fMonadIOView$fMonadStateMFlowStateView$fMonadTransFlowM$fMonadTransView $fMonadView$fAlternativeView$fApplicativeView $fFunctorView$fFunctorFormElm$fSerialize(,)$fSerializeFormElm$fMonadStatesBackT$fMonadTransBackT$fFunctorBackT$fMonadIOBackT $fMonadBackT$fSerializeFailBack$fIndexableConfig$fIndexableUser$fSerializableamix*>Tuple6Tuple5Tuple4Tuple3Tuple2Flattendoflat AjaxSessionIdMFOption CheckBoxesRadio!>getParamgetCurrentName setOption1validreceiveWithTimeoutsinstallServerControl$fFormInputByteString$fFlattenMaybe(,,,,,)$fFlattenMaybe(,,,,)$fFlattenMaybe(,,,)$fFlattenMaybe(,,)$fFlattenMaybe(,) $fMonoidView $fMonoidView0$fMonoidCheckBoxes$fFormInputMarkupM$fTypeableHtml$fFormInputHtml$fADDATTRSView syncCache ssyncCache adminLoop1 adminMFlowerrorsusers showFormList optionsUser datePickerKeyTFieldsMedit readyJQuery jqueryScript jqueryCSSjqueryUI getEdited1 setEdited addEdited modifyWidget writetFieldwritetFieldSTM readtFieldtFields$fIndexableMap$fTypeableMeditTRespTRespRTRempty ToResponse toResponse contentHtml1mkParamsmkparam$fToResponseHttpData$fToResponse[]$fToResponseByteString$fToResponseResponse$fToResponseTResp $fMonoidTRespflow splitPath tvresourcesstatCookieNameputStateCookiegetStateCookie$fProcessableRequest Applicative safeIOToSTM setConditions defaultCheckclearSyncCacheatomicallySync syncWriteclearSyncCacheProcdeleteResourcesdeleteResource getResources getResource withResources withResourcewithSTMResourcesflushAll invalidateKeyflushKey flushDBRef onNothingdelDBRefnewDBRefgetDBRef keyObjDBRef writeDBRef readDBRefnumElemsnewCachesetCacheCache Synchronous cacheSizecheck frecuency Asyncronous SyncManualSyncModeData.TCache.Triggers addTriggerDBRefData.TCache.IResource resources delResource writeResource readResourcereadResourceByKey keyResource IResourceRetrytoReturntoDeletetoAdd Resources GHC.Conc.SyncSTM unsafeIOToSTM atomically AlternativeoptionalliftA3liftA2liftA<**>puremanysomeemptygetConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipListGHC.Base<$blaze-markup-0.5.1.5Text.Blaze.Internal!AttributeValue AttributeTagMarkup dataAttributecustomAttributeunsafeByteStringunsafeLazyByteStringtextTag stringTagunsafeByteStringValueunsafeLazyByteStringValuecontents Text.BlazeToValuetoValuepreEscapedToValueToMarkuptoMarkuppreEscapedToMarkupblaze-html-0.6.1.1Text.Blaze.Html5wbrvideovarultracktrtitletimetheadthtfoottextareatdtbodytablesupsummarysubstylestrongspansourcesmallselectsectionscriptsamprubyrtrpqprogresspreparampoutputoptionoptgroupolobjectnoscriptnavmetermetamenuitemmenumarklinklilegendlabelkeygenkbdinsinputimgiframeihtmlhrhgroupheaderheadh6h5h4h3h2h1formfooterfigure figcaptionfieldsetembedemdtdldivdfndetailsdeldddatalistcommandcolgroupcolcodecitecaptioncanvasbuttonbrbody blockquotebdobaudioasidearticleareaaddressabbra docTypeHtmldocTypeText.Blaze.HtmlpreEscapedToHtmltoHtmlHtmlText.Blaze.Html5.Attributesxmlnswrapwidthvalueusemaptype_targettabindexsubjectstartsrcdocsrc spellchecksizessizeshapeselectedseamlessscopedscopesandboxrowspanrowsreversedrequiredrelreadonly radiogrouppubdatepreload placeholderpingpatternoptimumopen onwaitingonvolumechangeonunloadonundo ontimeupdate onsuspendonsubmit onstorage onstalledonselect onseekingonseekedonscrollonresizeonredoonreadystatechange onratechange onpropstate onprogress onplayingonplayonpause onpageshow onpagehideononline onmousewheel onmouseup onmouseover onmouseout onmousemove onmousedown onmessage onloadstartonloadedmetadata onloadeddataonloadonkeyup onkeydown oninvalidoninput onhaschange onforminput onformchangeonfocusonerroronended onemptiedondurationchangeondrop ondragstart ondragover ondragleave ondragenter ondragendondrag ondblclick oncontextmenuonclickonchangeoncanplaythrough oncanplayonblur onbeforeprintonbeforeonload novalidatenamemultipleminmethodmedia maxlengthmaxmanifestlowlooplistlangkeytypeitempropitemismapidicon httpEquivhreflanghrefhighhiddenheightheaders formtargetformnovalidate formmethod formenctype formactionforenctype draggabledisableddirdeferdatetimedata_coordscontrols contextmenucontenteditablecontentcolspancolsclass_checkedcharset challengeautoplay autofocus autocompleteasyncaltaction accesskey acceptCharsetaccepttextnetwork-conduit-1.0.0Data.Conduit.Network.UtilsHostAnyHostIPv4HostIPv6HostHostPreference wai-1.4.0.2 Network.Wai responseLBSresponseSourceresponseStatusrequestBodyLengthvault requestBody queryStringpathInfo remoteHostisSecurerequestHeaders serverPort serverNamerawQueryString rawPathInfo httpVersion requestMethodRequest ResponseFileResponseBuilderResponseSourceResponsefilePartByteCountfilePartOffsetFilePart Application Middleware ChunkedBody KnownLengthRequestBodyLength warp-1.3.9.2Network.Wai.Handler.Warp.RunrunSettingsConnectionMakerrunSettingsConnectionrunSettingsSocket runSettingsrunsocketConnection Network.Wai.Handler.Warp.Request parseRequest!Network.Wai.Handler.Warp.Response sendResponse!Network.Wai.Handler.Warp.SettingsdefaultSettingssettingsServerNamesettingsBeforeMainLoopsettingsResourceTPerRequestsettingsFdCacheDurationsettingsManagersettingsInterceptsettingsTimeoutsettingsOnClosesettingsOnOpensettingsOnException settingsHost settingsPortSettingsNetwork.Wai.Handler.Warp.Types dummyCleaner warpVersionPortNotEnoughLines BadFirstLineNonHttpIncompleteHeadersConnectionClosedByPeerOverLargeHeaderInvalidRequestconnRecv connClose connSendFile connSendAll connSendMany Connection Network.Wai.Handler.Warp.Timeout withManagercancelresumepauseregisterKillThreadregister initializeManagerHandletransformers-0.3.0.0Control.Monad.IO.ClassMonadIOliftIOxhtml-3000.2.1Text.XHtml.Strict prettyHtmlrenderHtmlWithLanguage renderHtmlshowHtmlText.XHtml.Extrasguiclickmapafile textfieldpasswordsubmitresetradiocheckboxdefList unordListordListhotlinkbullet spaceHtml copyright primHtmlChar linesToHtml lineToHtml stringToHtmlURLhotLinkAttributeshotLinkContents hotLinkURLHotLinkText.XHtml.Strict.Elementsvariableulistttthetitlethespanthemapthelinkthehtmlthedivthecodethebasesamplequote paragrapholistkeyboarditalicsimage emphasizedtermdlistdefineddefboldbiganchoracronymText.XHtml.Strict.Attributesvalignthetypethestylethefortheclassrulesrevnohref identifier httpequivcodebase cellspacing cellpadding bordercolorborderarchivealtcodealignText.XHtml.InternalsprettyHtmlFragmentrenderHtmlFragmentshowHtmlFragmentprimHtmlstringToHtmlStringhtmlAttrstrAttrintAttr emptyAttritagtagisNoHtmlnoHtml+++ concatHtml htmlAttrPairHtmlAttrtoHtmlFromListHTMLADDATTRS changeAttrs CHANGEATTRSverifyM testNumber getTestNumber $fGeneratea $fGenerate(,)$fGenerate(,)0$fGenerateInteger $fGenerateInt $fGenerate[]$fGenerateMaybe