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"><<a href="mailto:vandijk.roel@gmail.com">vandijk.roel@gmail.com</a>></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>
=> [a] -- ^ Elements to select from<br>
-> (a -> b) -- ^ Constructor to apply to selected element<br>
-> Gen b<br>
selector list ctor = oneof (map (return . ctor) list)<br>
<br>
</div>So placing the => and -> before the lines instead of after them?<br>
<br>
2011/8/25 Arnaud Bailly <<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello,<br>
> while trying to generate Haddock documentation (Haddock version 2.9.2, (c)<br>
> Simon Marlow 2006), it chokes on the following fragment<br>
><br>
> -- |Apply a given function over all elements of a list and select one of the<br>
> -- results.<br>
> selector :: (Arbitrary b) =><br>
> [a] -> -- ^ Elements to select from<br>
> (a -> b) -> -- ^ Constructor to apply to selected element<br>
> Gen b<br>
> selector list ctor = oneof (map (return . ctor) list)<br>
><br>
> with the following error message:<br>
><br>
> ' parse error on input `-- ^ Elements to select from<br>
><br>
> I am puzzled as this is exactly how arguments are supposed to be documented,<br>
> 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>
><br>
> Any clues ?<br>
><br>
> Arnaud<br>
><br>
</div></div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">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>
><br>
><br>
</blockquote></div><br>