[Haskell-cafe] Haddock chokes on function arguments
arnaud.oqube at gmail.com
Thu Aug 25 16:44:27 CEST 2011
Yes, it works better. Thanks for fixing my dumbness. But then, why is it
documented the other way ?
On Thu, Aug 25, 2011 at 4:30 PM, Roel van Dijk <vandijk.roel at gmail.com>wrote:
> Does it help if you format it like this:
> -- |Apply a given function over all elements of a list and select one of
> -- results.
> selector :: (Arbitrary b)
> => [a] -- ^ Elements to select from
> -> (a -> b) -- ^ Constructor to apply to selected element
> -> Gen b
> selector list ctor = oneof (map (return . ctor) list)
> So placing the => and -> before the lines instead of after them?
> 2011/8/25 Arnaud Bailly <arnaud.oqube at gmail.com>:
> > Hello,
> > while trying to generate Haddock documentation (Haddock version 2.9.2,
> > Simon Marlow 2006), it chokes on the following fragment
> > -- |Apply a given function over all elements of a list and select one of
> > -- results.
> > selector :: (Arbitrary b) =>
> > [a] -> -- ^ Elements to select from
> > (a -> b) -> -- ^ Constructor to apply to selected element
> > Gen b
> > selector list ctor = oneof (map (return . ctor) list)
> > with the following error message:
> > ' parse error on input `-- ^ Elements to select from
> > I am puzzled as this is exactly how arguments are supposed to be
> > according to
> > Any clues ?
> > Arnaud
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe