will it be possible to easily interleave IO values into the HTML? like instead of the [1,2,3]<br><pre><code><span>ul $ forM_ [</span><span>1</span><span>, </span><span>2</span><span>, </span><span>3</span><span>] (li . string . </span><span>show</span><span>)</span></code></pre>
what if it was a function that returned IO [1,2,3] (maybe 1,2,3 came out of a database). will the forM_ handle that OK?<br><br><br><div class="gmail_quote">On Thu, May 27, 2010 at 12:19 PM, Matt Parker <span dir="ltr">&lt;<a href="mailto:moonmaster9000@gmail.com">moonmaster9000@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Blaze HTML looks wonderful to me (especially with the do notation), and better then Hamlet for one reason: writing idiomatic haskell for stuff like this:<br>
<pre><code><span>ul $ forM_ [</span><span>1</span><span>, </span><span>2</span><span>, </span><span>3</span><span>] (li . string . </span><span>show</span><span>)</span></code></pre>
instead of the Hamlet style:<br><pre>%ul<br>  $forall children.person child<br>    %li $child$<br></pre>which, i don&#39;t know, for some reason, made me feel like i was back in PHP land. <br><br>-matt<br><br>
<br><div class="gmail_quote"><div><div></div><div class="h5">On Thu, May 27, 2010 at 7:08 AM, Alberto G. Corona <span dir="ltr">&lt;<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
As a user, I have too many HTML generators, a few of them with Ajax and none with server-side event handling (like ASPX or JSPX).  Ajax is complicated but server side event handling is  what I really miss because it is simple  from the user point of view, my ervents could be handled in haskell code rather than in javaScript and I  implicitly could  use the advantages of  dinamic HTML and Ajax without the need to know them at all. <div>


<br></div><div>Imagine a dynamic Web application  with 100% haskell code made with dynamic widgets created by third party developers.<div><br></div><div>So, anyone want to create a HTML templating system with server side event handling? It is not terribly hard to do. (I refer to <a href="http://ASP.NET" target="_blank">ASP.NET</a> documentation or the JavaServer Faces framework).</div>


<div><br>By the way, I vote for XML templating or else, combinator templating that produce XHML templating because it can be handled by a future graphical IDE.<br><br><div class="gmail_quote">2010/5/27 Jasper Van der Jeugt <span dir="ltr">&lt;<a href="mailto:jaspervdj@gmail.com" target="_blank">jaspervdj@gmail.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hey Bas,<br>
<div><br>
&gt; How about also providing an enumerator back-end?<br>
&gt; <a href="http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM" target="_blank">http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM</a><br>



&gt;<br>
&gt; Then your library can integrate more easily with the snap framework:<br>
&gt; <a href="http://snapframework.com" target="_blank">http://snapframework.com</a><br>
<br>
</div>Sure, I can do that. But I already tested integration with the snap<br>
framework, the best path here seems to call the `writeLBS` function<br>
from the snap framework on the `L.ByteString` that BlazeHtml produces<br>
(`writeLBS` internally uses an enumerator).<br>
<br>
Kind regards,<br>
<font color="#888888">Jasper Van der Jeugt<br>
</font></div></div><div><div></div><div><div><div></div><div><br>
On Thu, May 27, 2010 at 10:38 AM, Bas van Dijk &lt;<a href="mailto:v.dijk.bas@gmail.com" target="_blank">v.dijk.bas@gmail.com</a>&gt; wrote:<br>
&gt; Q14: Do you see any problems with respect to integrating BlazeHtml in<br>
&gt; your favourite web-framework/server?<br>
&gt;<br>
&gt; How about also providing an enumerator back-end?<br>
&gt; <a href="http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM" target="_blank">http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM</a><br>



&gt;<br>
&gt; Then your library can integrate more easily with the snap framework:<br>
&gt; <a href="http://snapframework.com" target="_blank">http://snapframework.com</a><br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Bas<br>
&gt;<br>
_______________________________________________<br></div></div>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div></div>
<br></div></div>_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org" target="_blank">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
<br></blockquote></div><br>
</blockquote></div><br>