[Haskell-cafe] Re: Comments from OCaml Hacker Brian Hurt

david48 dav.vire+haskell at gmail.com
Sat Jan 17 05:08:25 EST 2009

On Fri, Jan 16, 2009 at 10:28 PM, Apfelmus, Heinrich
<apfelmus at quantentunnel.de> wrote:

> david48 wrote:

>> I don't care about the name, it's ok for me that the name
>> mathematicians defined is used, but there are about two categories of
>> people using haskell and
>> I would love that each concept would be adequately documented for everyone:
>> - real-world oriented programming documentation with usefulness and
>> examples for the non mathematician
>> - the mathematics concepts and research papers for the mathematicians
>> for those who want/need to go further

>> As someone mentionned, the documentation can't really be done by
>> someone that doesn't fully grok the concepts involved.

> Good account of the current documentation situation.

> Hm, what about the option of opening Bird's "Introduction on Functional
> Programming using Haskell" in the section about fold? Monoid is on page
> 62 in the translated copy I've got here.

I don't have this book. I have real world haskell and purely
functional data structures though.

> Does Hutton's book mention them? Real World Haskell?

the first time it is mentionned in RWH according to the index is page
266 where we read
"We forgot to test the Monoid instance"
"...of Monoid, which is the class of types that support appending and
empty elements:"

Appending.... :)

On the other hand, on page 320 there is a nice explanation of Monoid,
and on page 380, which isn't mentionned in the index, there might be
the first time one can understand why the writer monad works with
monoids instead of lists: to be able to use better suited data types
for appending.

All of this is still lacking the great why : why/how an abstraction so
generic can be useful.
I'm starting to believe that the only reason to make a datatype an
instance of Monoid is... why not ! since it's not hard to find an
associative operation and a neutral element.

> I don't think that I would try to learn a programming language, for
> example Python, without obtaining a paper book on it.

I would, if the online documentation makes it possible, and then I
would buy a paper book later, to go further or for reference.
That's how I learned Haskell, and much later I've bought my first book.

More information about the Haskell-Cafe mailing list