Hello,<br>I&#39;m doing it like that now, it works fine.<br>What was confusing me was whether I should pass the data of the form on the URL at some point or not (my knowledge of HTML is very low ;)<br><br>Now turning to digestive functors, I don&#39;t see where do goes the &quot;A.action actionURL&quot; part that was in traditionnal forms?<br>
It seems I need it for routing the result of the form.<br>I&#39;m doing it like that:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">type NomicServer       = ServerPartT IO</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">type RoutedNomicServer = RouteT PlayerCommand NomicServer</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">type NomicForm a       = HappstackForm IO String BlazeFormHtml a</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">data LoginPass = LoginPass { login :: PlayerName,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                             password :: PlayerPassword}</span><br>
<br><span style="font-family: courier new,monospace;">loginForm&#39; :: NomicForm LoginPass</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">loginForm&#39; = </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">   LoginPass &lt;$&gt; (TDB.label &quot;Login: &quot;    *&gt; inputText Nothing)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">             &lt;*&gt; (TDB.label &quot;Password: &quot; *&gt; inputText Nothing)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">             &lt;*  (submit &quot;Enter Nomic!&quot;)<br><br style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">loginPage :: RoutedNomicServer Html</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">loginPage = do</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   (l, _) &lt;- liftRouteT $ runForm loginForm&#39; &quot;prefix&quot; NoEnvironment</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">   let html = formHtml (unView l []) defaultHtmlConfig</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   ok $ H.html $ do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      H.head $ do</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        H.title (H.string &quot;Login to Nomic&quot;)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        H.link ! rel &quot;stylesheet&quot; ! type_ &quot;text/css&quot; ! href &quot;/static/css/nomic.css&quot;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        H.meta ! A.httpEquiv &quot;Content-Type&quot; ! content &quot;text/html;charset=utf-8&quot;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        H.meta ! A.name &quot;keywords&quot; ! A.content &quot;Nomic, game, rules, Haskell, auto-reference&quot;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      H.body $ do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        H.div ! A.id &quot;container&quot; $ do</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">           H.div ! A.id &quot;header&quot; $ &quot;Login to Nomic&quot;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">           H.div ! A.id &quot;login&quot; $ html</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">           H.div ! A.id &quot;footer&quot; $ &quot;footer&quot;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br>Also, I don&#39;t see how with digestive functors you can set all the HTML properties like id, tabindex, length etc...<br>
<br>Thanks,<br>Corentin<br><br><div class="gmail_quote">On Tue, Jan 25, 2011 at 5:42 AM, Jeremy Shaw <span dir="ltr">&lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I think you should just be able to use showURL to convert the url type<br>
into a String that you can use with blaze-html:<br>
<br>
data SiteURL = Post_Login | etc<br>
<div class="im"><br>
loginForm :: RoutedNomicServer Html<br>
loginForm = do<br>
</div>   actionURL &lt;- showURL Post_Login<br>
   ok $ H.form ! A.method &quot;POST&quot; ! A.action actionURL ! enctype<br>
<div class="im">&quot;multipart/form-data;charset=UTF-8&quot;  $ do<br>
       H.label ! for &quot;login&quot; $ &quot;Login&quot;<br>
       input ! type_ &quot;text&quot; ! name &quot;login&quot; ! A.id &quot;login&quot; ! tabindex<br>
&quot;1&quot; !  accesskey &quot;L&quot;<br>
       H.label ! for &quot;password&quot; $ &quot;Password&quot;<br>
       input ! type_ &quot;text&quot; ! name &quot;password&quot; ! A.id &quot;password&quot; !<br>
tabindex  &quot;2&quot; ! accesskey &quot;P&quot;<br>
       input ! type_  &quot;submit&quot; ! tabindex &quot;3&quot; ! accesskey &quot;S&quot; ! value<br>
&quot;Enter Nomic!&quot;<br>
<br>
</div>Using the HSP stuff you can avoid the explicit call to showURL and do:<br>
<br>
 &lt;form method=Post_Login enctype=&quot;multipart/form-data;charset=utf-8&quot;&gt;<br>
... &lt;/form&gt;<br>
<br>
But HSP is a fair bit more complex than blaze-html.<br>
<br>
If blaze-html provide an HtmlT monad that was a real monad transformer<br>
then you could do something similar using blaze. But they decided to<br>
trade-off functionality for speed.<br>
<br>
- jeremy<br>
<br>
On Sat, Jan 22, 2011 at 3:19 PM, Corentin Dupont<br>
<div><div></div><div class="h5">&lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt; wrote:<br>
&gt; Hello Jeremy,<br>
&gt; Yes it would be fine to use solution 1, but I just don&#39;t figured how to mix<br>
&gt; web routes and forms.<br>
&gt;<br>
&gt; My forms are like that:<br>
&gt; loginForm :: RoutedNomicServer Html<br>
&gt; loginForm = do<br>
&gt;    ok $ H.form ! A.method &quot;POST&quot; ! A.action &quot;/postLogin&quot; ! enctype<br>
&gt; &quot;multipart/form-data;charset=UTF-8&quot;  $ do<br>
&gt;        H.label ! for &quot;login&quot; $ &quot;Login&quot;<br>
&gt;        input ! type_ &quot;text&quot; ! name &quot;login&quot; ! A.id &quot;login&quot; ! tabindex &quot;1&quot; !<br>
&gt; accesskey &quot;L&quot;<br>
&gt;        H.label ! for &quot;password&quot; $ &quot;Password&quot;<br>
&gt;        input ! type_ &quot;text&quot; ! name &quot;password&quot; ! A.id &quot;password&quot; ! tabindex<br>
&gt; &quot;2&quot; ! accesskey &quot;P&quot;<br>
&gt;        input ! type_  &quot;submit&quot; ! tabindex &quot;3&quot; ! accesskey &quot;S&quot; ! value &quot;Enter<br>
&gt; Nomic!&quot;<br>
&gt;<br>
&gt; And are decoded using a FromData:<br>
&gt;<br>
&gt; instance FromData LoginPass where<br>
&gt;   fromData = do<br>
&gt;     login  &lt;- look &quot;login&quot; `mplus` (error &quot;need login&quot;)<br>
&gt;     password &lt;- look &quot;password&quot; `mplus` (error &quot;need password&quot;)<br>
&gt;     return $ LoginPass login password<br>
&gt;<br>
&gt; How this can go inside web routes? I cannot pass the parameters in the URL<br>
&gt; (here login and password), can I?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Corentin<br>
&gt;<br>
&gt; On Sat, Jan 22, 2011 at 9:49 PM, Jeremy Shaw &lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I believe you problem is because you are trying to use &#39;dir&#39; inside<br>
&gt;&gt; RouteT after you have already consumed and decode the path info using<br>
&gt;&gt; implSite.<br>
&gt;&gt;<br>
&gt;&gt; There are two solutions here:<br>
&gt;&gt;<br>
&gt;&gt;  1. just use web-routes for all your URLs instead of using a mixture<br>
&gt;&gt; of type-safe routes and &#39;dir&#39;.<br>
&gt;&gt;  2. put the calls to dir outside the call to implSite.<br>
&gt;&gt;<br>
&gt;&gt; For example, something like,<br>
&gt;&gt;<br>
&gt;&gt;   simpleHTTP nullConf $ msum [ dir &quot;Login&quot; $ loginPage,<br>
&gt;&gt;                                                , dir &quot;postLogin&quot; $<br>
&gt;&gt; postLogin<br>
&gt;&gt;                                                , implSite<br>
&gt;&gt; &quot;<a href="http://localhost:8000/" target="_blank">http://localhost:8000/</a>&quot; &quot;&quot; (nomicSite sh)<br>
&gt;&gt;                                                ]<br>
&gt;&gt;<br>
&gt;&gt; You to do that, you would also need to modified loginPage and<br>
&gt;&gt; postLogin to not be in the RoutedNomicServer monad. Since they do not<br>
&gt;&gt; appear to use the RouteT stuff anyway, that should not be hard ?<br>
&gt;&gt;<br>
&gt;&gt; But, personally, I would just choose option #1. Can you explain why<br>
&gt;&gt; you thought it was better to mix the web-routes stuff with the &#39;dir&#39;<br>
&gt;&gt; style guards? Maybe there is a short coming in web-routes that needs<br>
&gt;&gt; to be addressed ?<br>
&gt;&gt;<br>
&gt;&gt; - jeremy<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jan 21, 2011 at 2:33 PM, Corentin Dupont<br>
&gt;&gt; &lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello Jeremy,<br>
&gt;&gt; &gt; I&#39;m still trying to integrate web routes, but there is one thing I don&#39;t<br>
&gt;&gt; &gt; understand:<br>
&gt;&gt; &gt; how to deal with multiple forms?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In my former application, each forms used to redirect to a subdirectory<br>
&gt;&gt; &gt; of<br>
&gt;&gt; &gt; the web site, and an appropriate handler was waiting there.<br>
&gt;&gt; &gt; But now with web routes I don&#39;t see how to do that.<br>
&gt;&gt; &gt; I&#39;ve tried to push down the decision over subdirectories (with the guard<br>
&gt;&gt; &gt; &quot;dir&quot;) inside the RouteT monad:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; type NomicServer       = ServerPartT IO<br>
&gt;&gt; &gt; type RoutedNomicServer = RouteT PlayerCommand NomicServer<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; nomicSite :: ServerHandle -&gt; Site PlayerCommand (NomicServer Html)<br>
&gt;&gt; &gt; nomicSite sh = setDefault (Noop 0) Site {<br>
&gt;&gt; &gt;       handleSite         = \f url -&gt; unRouteT (routedNomicHandle sh url)<br>
&gt;&gt; &gt; f<br>
&gt;&gt; &gt;     , formatPathSegments = \u -&gt; (toPathSegments u, [])<br>
&gt;&gt; &gt;     , parsePathSegments  = parseSegments fromPathSegments<br>
&gt;&gt; &gt; }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; routedNomicHandle :: ServerHandle -&gt; PlayerCommand -&gt; RoutedNomicServer<br>
&gt;&gt; &gt; Html<br>
&gt;&gt; &gt; routedNomicHandle sh pc = do<br>
&gt;&gt; &gt;    d &lt;- liftRouteT $ liftIO getDataDir<br>
&gt;&gt; &gt;    msum [dir &quot;Login&quot; $ loginPage,<br>
&gt;&gt; &gt;          dir &quot;postLogin&quot; $ postLogin,<br>
&gt;&gt; &gt;          --nullDir &gt;&gt; fileServe [] d,<br>
&gt;&gt; &gt;          dir &quot;NewRule&quot; $ newRule sh,<br>
&gt;&gt; &gt;          dir &quot;NewGame&quot; $ newGameWeb sh,<br>
&gt;&gt; &gt;          dir &quot;Nomic&quot; $ routedNomicCommands sh pc]<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; routedNomicCommands :: ServerHandle -&gt; PlayerCommand -&gt;<br>
&gt;&gt; &gt; RoutedNomicServer<br>
&gt;&gt; &gt; Html<br>
&gt;&gt; &gt; routedNomicCommands sh (Noop pn)                   = nomicPageComm pn sh<br>
&gt;&gt; &gt; (return ())<br>
&gt;&gt; &gt; routedNomicCommands sh (JoinGame pn game)          = nomicPageComm pn sh<br>
&gt;&gt; &gt; (joinGame game pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (LeaveGame pn)              = nomicPageComm pn sh<br>
&gt;&gt; &gt; (leaveGame pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (SubscribeGame pn game)     = nomicPageComm pn sh<br>
&gt;&gt; &gt; (subscribeGame game pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (UnsubscribeGame pn game)   = nomicPageComm pn sh<br>
&gt;&gt; &gt; (unsubscribeGame game pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (Amend pn)                  = nomicPageComm pn sh<br>
&gt;&gt; &gt; (amendConstitution pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (DoAction pn an ar)         = nomicPageComm pn sh<br>
&gt;&gt; &gt; (doAction&#39; an ar pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (NewRule pn name text code) = nomicPageComm pn sh<br>
&gt;&gt; &gt; (submitRule name text code pn)<br>
&gt;&gt; &gt; routedNomicCommands sh (NewGame pn game)           = nomicPageComm pn sh<br>
&gt;&gt; &gt; (newGame game pn)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; loginPage :: RoutedNomicServer Html<br>
&gt;&gt; &gt; loginPage = do<br>
&gt;&gt; &gt;    l &lt;- loginForm<br>
&gt;&gt; &gt;    ok $ H.html $ do<br>
&gt;&gt; &gt;       H.head $ do<br>
&gt;&gt; &gt;         H.title (H.string &quot;Login to Nomic&quot;)<br>
&gt;&gt; &gt;         H.link ! rel &quot;stylesheet&quot; ! type_ &quot;text/css&quot; ! href<br>
&gt;&gt; &gt; &quot;/static/css/nomic.css&quot;<br>
&gt;&gt; &gt;         H.meta ! A.httpEquiv &quot;Content-Type&quot; ! content<br>
&gt;&gt; &gt; &quot;text/html;charset=utf-8&quot;<br>
&gt;&gt; &gt;         H.meta ! A.name &quot;keywords&quot; ! A.content &quot;Nomic, game, rules,<br>
&gt;&gt; &gt; Haskell,<br>
&gt;&gt; &gt; auto-reference&quot;<br>
&gt;&gt; &gt;       H.body $ do<br>
&gt;&gt; &gt;         H.div ! A.id &quot;container&quot; $ do<br>
&gt;&gt; &gt;            H.div ! A.id &quot;header&quot; $ &quot;Login to Nomic&quot;<br>
&gt;&gt; &gt;            H.div ! A.id &quot;login&quot; $ l<br>
&gt;&gt; &gt;            H.div ! A.id &quot;footer&quot; $ &quot;footer&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; loginForm :: RoutedNomicServer Html<br>
&gt;&gt; &gt; loginForm = do<br>
&gt;&gt; &gt;    ok $ H.form ! A.method &quot;POST&quot; ! A.action &quot;/postLogin&quot; ! enctype<br>
&gt;&gt; &gt; &quot;multipart/form-data;charset=UTF-8&quot;  $ do<br>
&gt;&gt; &gt;       H.label ! for &quot;login&quot; $ &quot;Login&quot;<br>
&gt;&gt; &gt;       input ! type_ &quot;text&quot; ! name &quot;login&quot; ! A.id &quot;login&quot; ! tabindex &quot;1&quot;<br>
&gt;&gt; &gt; !<br>
&gt;&gt; &gt; accesskey &quot;L&quot;<br>
&gt;&gt; &gt;       H.label ! for &quot;password&quot; $ &quot;Password&quot;<br>
&gt;&gt; &gt;       input ! type_ &quot;text&quot; ! name &quot;password&quot; ! A.id &quot;password&quot; !<br>
&gt;&gt; &gt; tabindex<br>
&gt;&gt; &gt; &quot;2&quot; ! accesskey &quot;P&quot;<br>
&gt;&gt; &gt;       input ! type_  &quot;submit&quot; ! tabindex &quot;3&quot; ! accesskey &quot;S&quot; ! value<br>
&gt;&gt; &gt; &quot;Enter<br>
&gt;&gt; &gt; Nomic!&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; postLogin :: RoutedNomicServer Html<br>
&gt;&gt; &gt; postLogin = do<br>
&gt;&gt; &gt;   methodM POST -- only accept a post method<br>
&gt;&gt; &gt;   mbEntry &lt;- getData -- get the data<br>
&gt;&gt; &gt;   case mbEntry of<br>
&gt;&gt; &gt;     Nothing -&gt; error $ &quot;error: postLogin&quot;<br>
&gt;&gt; &gt;     Just (LoginPass login password)  -&gt; do<br>
&gt;&gt; &gt;       mpn &lt;- liftRouteT $ liftIO $ newPlayerWeb login password<br>
&gt;&gt; &gt;       case mpn of<br>
&gt;&gt; &gt;          Just pn -&gt; do<br>
&gt;&gt; &gt;             link &lt;- showURL $ Noop pn<br>
&gt;&gt; &gt;             seeOther link $ string &quot;Redirecting...&quot;<br>
&gt;&gt; &gt;          Nothing -&gt; seeOther (&quot;/Login?status=fail&quot; :: String) $ string<br>
&gt;&gt; &gt; &quot;Redirecting...&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; launchWebServer :: ServerHandle -&gt; IO ()<br>
&gt;&gt; &gt; launchWebServer sh = do<br>
&gt;&gt; &gt;    putStrLn &quot;Starting web server...\nTo connect, drive your browser to<br>
&gt;&gt; &gt; \&quot;<a href="http://localhost:8000/Login%5C" target="_blank">http://localhost:8000/Login\</a>&quot;&quot;<br>
&gt;&gt; &gt;    simpleHTTP nullConf $ implSite &quot;<a href="http://localhost:8000/" target="_blank">http://localhost:8000/</a>&quot; &quot;&quot; (nomicSite<br>
&gt;&gt; &gt; sh)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; But when I drive my browser to &quot;<a href="http://localhost:8000/Login/" target="_blank">http://localhost:8000/Login/</a>&quot;, happstack<br>
&gt;&gt; &gt; tell me there is nothing here.<br>
&gt;&gt; &gt; Am I doing it right? If yes, I must have made a mistake.<br>
&gt;&gt; &gt; (as you can see I&#39;m still far from putting in disgestive functors ;)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If you need, the complete application can be found here (see file<br>
&gt;&gt; &gt; Web.hs):<br>
&gt;&gt; &gt; <a href="https://github.com/cdupont/Nomic" target="_blank">https://github.com/cdupont/Nomic</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt; Corentin<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wed, Jan 19, 2011 at 5:12 PM, Corentin Dupont<br>
&gt;&gt; &gt; &lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks Jeremy.<br>
&gt;&gt; &gt;&gt; I had it to work now ;)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Corentin<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Tue, Jan 18, 2011 at 6:01 PM, Jeremy Shaw &lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; trhsx will be installed in ~/.cabal/bin, so you will need to add that<br>
&gt;&gt; &gt;&gt;&gt; to your PATH.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; In order to use the demo code I provided you would need the latest<br>
&gt;&gt; &gt;&gt;&gt; happstack from darcs because it contains a few differences in the API.<br>
&gt;&gt; &gt;&gt;&gt; The code can be made to work with what is on hackage though.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; The submit issue is actually a bug in digestive-functors-blaze. The<br>
&gt;&gt; &gt;&gt;&gt; return type should be, Form m i e BlazeFormHtml (). jaspervdj is going<br>
&gt;&gt; &gt;&gt;&gt; to patch it and upload a new version.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; - jeremy<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On Thu, Jan 13, 2011 at 2:40 PM, Corentin Dupont<br>
&gt;&gt; &gt;&gt;&gt; &lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; I&#39;m using the combination happstack + digestive-functors +<br>
&gt;&gt; &gt;&gt;&gt; &gt; web-routes +<br>
&gt;&gt; &gt;&gt;&gt; &gt; blazeHTML.<br>
&gt;&gt; &gt;&gt;&gt; &gt; I&#39;m not finding any examples on the net...<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; I&#39;ve tried to adapt your example (thanks):<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; type NomicForm a = HappstackForm IO String BlazeFormHtml a<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; demoForm :: NomicForm (Text, Text)<br>
&gt;&gt; &gt;&gt;&gt; &gt; demoForm =<br>
&gt;&gt; &gt;&gt;&gt; &gt;     (,) &lt;$&gt; ((TDB.label &quot;greeting: &quot; ++&gt; inputNonEmpty Nothing) &lt;*<br>
&gt;&gt; &gt;&gt;&gt; &gt; br)<br>
&gt;&gt; &gt;&gt;&gt; &gt;         &lt;*&gt; ((TDB.label &quot;noun: &quot;     ++&gt; inputNonEmpty Nothing) &lt;*<br>
&gt;&gt; &gt;&gt;&gt; &gt; br)<br>
&gt;&gt; &gt;&gt;&gt; &gt;         &lt;*  (submit &quot;submit&quot;)<br>
&gt;&gt; &gt;&gt;&gt; &gt;     where<br>
&gt;&gt; &gt;&gt;&gt; &gt;       br :: NomicForm ()<br>
&gt;&gt; &gt;&gt;&gt; &gt;       br = view H.br<br>
&gt;&gt; &gt;&gt;&gt; &gt;       -- make sure the fields are not blank, show errors in line if<br>
&gt;&gt; &gt;&gt;&gt; &gt; they are<br>
&gt;&gt; &gt;&gt;&gt; &gt;       inputNonEmpty :: Maybe Text -&gt; NomicForm Text<br>
&gt;&gt; &gt;&gt;&gt; &gt;       inputNonEmpty v =<br>
&gt;&gt; &gt;&gt;&gt; &gt;           (inputText v `validate` (TD.check &quot;You can not leave this<br>
&gt;&gt; &gt;&gt;&gt; &gt; field<br>
&gt;&gt; &gt;&gt;&gt; &gt; blank.&quot; (not . T.null)) &lt;++ errors)<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; But I&#39;ve got a problem on submit and inputText. I don&#39;t see how they<br>
&gt;&gt; &gt;&gt;&gt; &gt; are<br>
&gt;&gt; &gt;&gt;&gt; &gt; compatible with HappstackForm.<br>
&gt;&gt; &gt;&gt;&gt; &gt; NomicForm a reduces to:<br>
&gt;&gt; &gt;&gt;&gt; &gt; Form (ServerPartT IO) Input String BlazeFormHtml a<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; whereas the type of submit is:<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; submit :: Monad m<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;        =&gt; String                            -- ^ Text on the submit<br>
&gt;&gt; &gt;&gt;&gt; &gt; button<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;        -&gt; Form m String e BlazeFormHtml ()  -- ^ Submit button<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Maybe I miss some instance?<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; BTW, I also tried to execute your exemple, but I can&#39;t install some<br>
&gt;&gt; &gt;&gt;&gt; &gt; packages.<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; cabal install digestive-functors-hsp<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; cabal: Unknown build tool trhsx<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Whereas trhsx is in my PATH (under linux).<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; You said I need the latest happstack from darcs, why?<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Cheers,<br>
&gt;&gt; &gt;&gt;&gt; &gt; Corentin<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; On Sun, Jan 9, 2011 at 8:36 PM, Jeremy Shaw &lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; newRule also needs to have the type, RoutedNomicServer. The<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; transformation of RoutedNomicServer into NomicServer is done in the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; handleSite function. Something like this:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; nomicSpec :: ServerHandle -&gt; Site Route (ServerPartT IO Response)<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; nomicSpec sh =<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;      Site { handleSite          = \f url -&gt; unRouteT (nomicSite sh<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; url) f<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;             ...<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; main =<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;    do ...<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;      simpleHTTP nullConf $ siteImpl (nomicSpec sh)<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Or something like that -- it&#39;s hard to tell exactly what is going<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; on<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; in your app based on the snippets you provided.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Also, I highly recommend using digestive functors instead of<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; formlets.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; It is the successor to formlets. Same core idea, better<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; implementation<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; and actively maintained.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; I have attached a quick demo of using:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; happstack+digestive-functors+web-routes+HSP<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; To use it you will need the latest happstack from darcs plus:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  hsp<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  web-routes<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  web-routes-hsp<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  web-routes-happstack<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  web-routes-mtl<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  digestive-functors<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;  digestive-functors-hsp<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; I plan to clean up this example and document it better in the crash<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; course for the upcoming release. Clearly things like the FormInput<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; instance and the formPart function belong a library.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; let me know if you have more questions.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; - jeremy<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; On Sat, Jan 8, 2011 at 6:44 PM, Corentin Dupont<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I have difficulties mixing web-routes and forms:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I have put routes in all my site, except for forms which remains<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; with<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; type ServerPartT IO Response.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; How to make them work together?<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I have:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; type NomicServer             = ServerPartT IO<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; type RoutedNomicServer = RouteT PlayerCommand NomicServer<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; newRule :: ServerHandle -&gt; NomicServer Response<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; newRule sh = do<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    methodM POST -- only accept a post method<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    mbEntry &lt;- getData -- get the data<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    case mbEntry of<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;       Nothing -&gt; error $ &quot;error: newRule&quot;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;       Just (NewRule name text code pn) -&gt; do<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;          html &lt;- nomicPageComm pn sh (submitRule name text code<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; pn))<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;          ok $ toResponse html<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; nomicPageComm :: PlayerNumber -&gt; ServerHandle -&gt; Comm () -&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; RoutedNomicServer Html<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; nomicPageComm pn sh comm =<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; (..)<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; launchWebServer :: ServerHandle -&gt; IO ()<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; launchWebServer sh = do<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    putStrLn &quot;Starting web server...\nTo connect, drive your<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; browser<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; to<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; \&quot;<a href="http://localhost:8000/Login%5C" target="_blank">http://localhost:8000/Login\</a>&quot;&quot;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    d &lt;- liftIO getDataDir<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;    simpleHTTP nullConf $ mconcat [dir &quot;postLogin&quot; $ postLogin,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   fileServe [] d,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   dir &quot;Login&quot; $ ok $ toResponse $<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; loginPage,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   dir &quot;NewRule&quot; $ newRule sh,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   dir &quot;NewGame&quot; $ newGameWeb sh,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   dir &quot;Nomic&quot; $ do<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                      html &lt;- implSite<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; &quot;<a href="http://localhost:8000/Nomic/" target="_blank">http://localhost:8000/Nomic/</a>&quot; &quot;&quot; (nomicSite sh)<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                      ok $ toResponse html<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;                                   ]<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; The red line doesn&#39;t compile. I don&#39;t know how to transform a<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; RoutedNomicServer into a NomicServer.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; For the future I intend to use formlets: is these some examples<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; of<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; programs<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; using happstack + web-routes + formlets?<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Corentin<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; On Fri, Jan 7, 2011 at 5:10 PM, Jeremy Shaw<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; &lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; The [(String, String)] argument is for adding query parameters.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; encodePathInfo [&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;] [(&quot;key&quot;,&quot;value&quot;)]<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &quot;foo/bar/baz?key=value&quot;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; Instead of showURL you would use showURLParams.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; hope this helps!d<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; - jeremy<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; On Fri, Jan 7, 2011 at 8:12 AM, Corentin Dupont<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &lt;<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; Hello Jeremy,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; I&#39;m using Web routes with happstack.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; I&#39;m following this tutorial:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://tutorialpedia.org/tutorials/Happstack+type+safe+URLs.html" target="_blank">http://tutorialpedia.org/tutorials/Happstack+type+safe+URLs.html</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; But It seems out of synch with the latest version of<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; web-routes:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; 0.23.2.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; The haddock documentation seems out of date also:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; encodePathInfo :: [String] -&gt; [(String, String)] -&gt; String<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; For example:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;  encodePathInfo [\&quot;foo\&quot;, \&quot;bar\&quot;, \&quot;baz\&quot;]<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; &quot;foo/bar/baz&quot;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; And I can&#39;t figure out what this [(String, String)] is for ;)<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt; Corentin<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>