Hi Jeremy<br><br>If  the signature of a formlet or digestive functor is<br><br>View <i>format m a </i><br><br>with `<i>m</i>` a monad,  `<i>a</i>` the resulting value  and `<i>format</i>` the formatting (Usually HTML)<br><br>

 then the signatures of the operators for Text.XHtml format are:<br><br><i>(&lt;&lt;&lt;) :: Monad m =&gt; (Html -&gt; Html) -&gt; View Html m a -&gt; View Html m a<br><br>(&lt;++) :: Monad m =&gt; Html -&gt; View Html m a -&gt; View Html m a<br>

<br>(++&gt;) :: Monad m =&gt; View Html m a -&gt; Html -&gt; View Html m a<br><br>(&lt;+&gt;) ::  Monad m  =&gt; View Html m a    -&gt; View Html m b -&gt; View Html m (Either a&#39; b&#39;)</i><br><br><br>My mplementation is tightly integrated with other non  related functionalities in an app server that I´m developing so a translation to diggestive functors is not trivial, but I too would love to have this integrated in digestive functors for the shake of modularity. <br>

<br><br><br>2012/2/3 Jeremy Shaw &lt;<a href="mailto:jeremy@n-heptane.com">jeremy@n-heptane.com</a>&gt;:<br>&gt; Hello,<br>&gt;<br>&gt; Formlets is deprecated in favor of digestive functors. If you have not looked at the digestive-functors package I highly recommend that you do. It fixes a lot of little issues that formlets had -- but is basically the same thing.<br>

&gt;<br>&gt; The (&lt;&lt;&lt;) operator is a already a standard operator in Control.Category / Control.Arrow. So, it is probably confusing to reuse that symbol for something else…<br>&gt;<br>&gt; The digestive functors library defines two new operators (++&gt;) and (&lt;++) which are somewhat related to what you are trying to do.<br>

&gt;<br>&gt; In HTML, the &lt;label&gt; tag is supposed to reference the &#39;id&#39; of the field is it labeling. For example, you might have:<br>&gt;<br>&gt;  &lt;label for=&quot;username&quot;&gt;Username: &lt;/label&gt;&lt;input text=&quot;text&quot; id=&quot;username&quot; name=&quot;username&quot; value=&quot;&quot;&gt;<br>

&gt;<br>&gt; In formlets, there was no way to do that because the &#39;ids&#39; are not accessible to the user. In digestive functors you can use the ++&gt; operator to &#39;share&#39; an id between to elements. That allows you to write:<br>

&gt;<br>&gt; label &quot;Username :&quot; ++&gt;  inputText Nothing<br>&gt;<br>&gt; Anyway, I would  love to see:<br>&gt;<br>&gt;  a) your new combinators renamed and reimplemented for digestive-functors<br>&gt;  b) the type signatures of these new operators<br>

&gt;<br>&gt; With out the type signatures it is a bit hard to decipher what your new operators are actually doing..<br>&gt;<br>&gt; But, I love seeing any new improvements to the formlets/digestive-functors concept!<br>&gt;<br>

&gt; - jeremy<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Feb 2, 2012, at 6:50 PM, Alberto G. Corona wrote:<br>&gt;<br>&gt;&gt; I came across the idea that is easy to define additional operators to<br>&gt;&gt; Text.FormLets for adding custom HTML formatting.<br>

&gt;&gt; Had anyone tried that?<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; For example to enclose the Prod formulary in a Table using Text.XHtml<br>&gt;&gt; tags. I defined additional operators &lt;&lt;&lt; and &lt;++ for enclosing and<br>

&gt;&gt; prepending<br>&gt;&gt; Html to a formLet, respectively:<br>&gt;&gt;<br>&gt;&gt;&gt; data Prod= Prod{pname :: String, pprice :: Int}<br>&gt;&gt;<br>&gt;&gt;&gt; getProd= table &lt;&lt;&lt; (<br>&gt;&gt;&gt;      Prod &lt;$&gt; tr &lt;&lt;&lt; (td &lt;&lt; &quot;enter the name&quot;  &lt;++ td &lt;&lt;&lt; getString (pname &lt;$&gt; mp))<br>

&gt;&gt;&gt;                &lt;*&gt; tr &lt;&lt;&lt; (td &lt;&lt; &quot;enter the price&quot;   &lt;++ td &lt;&lt;&lt; getInt ( pprice &lt;$&gt; mp)))<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; even:<br>&gt;&gt;<br>&gt;&gt;&gt; p &lt;&lt; &quot;paragraph&quot; &lt;++ getProd   ++&gt; (more Html stuff)<br>

&gt;&gt;<br>&gt;&gt;  is possible<br>&gt;&gt;<br>&gt;&gt; or even it is possible an operator &lt;+&gt;<br>&gt;&gt;<br>&gt;&gt;&gt; getProd &lt;+&gt; someOtherStuff<br>&gt;&gt;<br>&gt;&gt; to return  Either Prod OtherStuff<br>

&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; I did it in my own version of FormLets. So It is too heavy to put<br>&gt;&gt; here a running example. It is part of a package that I will upload<br>&gt;&gt; soon to hackage.<br>&gt;&gt;<br>

&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; This also may work for embedding formLets in other haskell HTML<br>&gt;&gt; formats besides Text.XHtml.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Haskell-Cafe mailing list<br>

&gt;&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>&gt;<br>

<br>