Yes, it works better. Thanks for fixing my dumbness. But then, why is it documented the other way ?<br><br>Regards,<br>Arnaud<br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 4:30 PM, Roel van Dijk <span dir="ltr">&lt;<a href="mailto:vandijk.roel@gmail.com">vandijk.roel@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Does it help if you format it like this:<br>
<div class="im"><br>
-- |Apply a given function over all elements of a list and select one of the<br>
-- results.<br>
selector :: (Arbitrary b)<br>
         =&gt; [a]       -- ^ Elements to select from<br>
         -&gt; (a -&gt; b)  -- ^ Constructor to apply to selected element<br>
         -&gt; Gen b<br>
selector list ctor = oneof (map (return . ctor) list)<br>
<br>
</div>So placing the =&gt; and -&gt; before the lines instead of after them?<br>
<br>
2011/8/25 Arnaud Bailly &lt;<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hello,<br>
&gt; while trying to generate Haddock documentation (Haddock version 2.9.2, (c)<br>
&gt; Simon Marlow 2006), it chokes on the following fragment<br>
&gt;<br>
&gt; -- |Apply a given function over all elements of a list and select one of the<br>
&gt; -- results.<br>
&gt; selector :: (Arbitrary b) =&gt;<br>
&gt;             [a]      -&gt; -- ^ Elements to select from<br>
&gt;             (a -&gt; b) -&gt; -- ^ Constructor to apply to selected element<br>
&gt;             Gen b<br>
&gt; selector list ctor = oneof (map (return . ctor) list)<br>
&gt;<br>
&gt; with the following error message:<br>
&gt;<br>
&gt; &#39;   parse error on input `-- ^ Elements to select from<br>
&gt;<br>
&gt; I am puzzled as this is exactly how arguments are supposed to be documented,<br>
&gt; according to <a href="http://www.haskell.org/haddock/doc/html/ch03s02.html#id565220" target="_blank">http://www.haskell.org/haddock/doc/html/ch03s02.html#id565220</a><br>
&gt;<br>
&gt; Any clues ?<br>
&gt;<br>
&gt; Arnaud<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>