[Haskell-cafe] Comments from OCaml Hacker Brian Hurt

David Menendez dave at zednenem.com
Fri Jan 16 13:08:29 EST 2009


On Fri, Jan 16, 2009 at 12:19 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Fri, Jan 16, 2009 at 12:00:40PM -0500, David Menendez wrote:
>> It would be nice to explain what operations have been chosen for the
>> Monoid instances of Prelude data types. (Maybe this belongs in the
>> Prelude documentation.)
>
> The right place for that is the instances, as soon as Haddock starts
> showing instance comments (http://trac.haskell.org/haddock/ticket/29).
> Then this information will be listed under both the type and the class.

In the case of Monoid, I think it would be best to have the
documentation now, and then attach them to the instances later, once
Haddock supports that.

>> I'd add a reminder that if you're defining a type with a Monoid
>> instance, your documentation should explain what the instance does.
>
> When that Haddock enhancement is done, this will be general advice for
> instances of all classes.

Sure, but it's especially important for Monoid.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>


More information about the Haskell-Cafe mailing list