
Given the amount of material posted at haskell.org and elsewhere explaining IO, monads and functors, has anyone considered publishing a comprehensive book explaining those subjects? (I am trying to read all the material online, but books are easier to read and don't require sitting in front of a computer to do so. Plus I can write in books :-). ) Thanks, Dave Feustel

On 3/27/07, Dave@haskell.org
Given the amount of material posted at haskell.org and elsewhere explaining IO, monads and functors, has anyone considered publishing a comprehensive book explaining those subjects? (I am trying to read all the material online, but books are easier to read and don't require sitting in front of a computer to do so. Plus I can write in books :-). )
Well, how much in depth are you interested in getting? I started reading Categories for the Working Mathematician a couple of months ago, and while it sometimes takes a bit of work it's a very good introduction. The only caution I have is that if you don't have that strong of a math background, or hadn't done it in a few years (like myself), you may have to lookup a lot of definitions in order to understand his examples. Wikipedia usually provides enough of a detailed description that you can get the point.

Categories for the Working Mathematician a couple of months ago, and while it sometimes takes a bit of work it's a very good introduction. The only caution I have is that if you don't have that strong of a math background, or hadn't done it in a few years (like myself), you may have to lookup a lot of definitions in order to understand his examples. Wikipedia usually provides enough of a detailed description that you can get the point.
Good lack to you but this is very bad advice. It is too much even for average mathematician. As a serious first read for CS guy I would recommend Categories for Types by Roy Crole. For short introduction: Basic Category Theory for Computer Scientists by Benjamin Pierce. The problem with learning CT lies in the large amount of mathematical intuition that is assumed. This intuition can be build by studing topology and algebra. Learning CT without this background is kind of a Turing test;-)

On 3/27/07, Dave@haskell.org
Given the amount of material posted at haskell.org and elsewhere explaining IO, monads and functors, has anyone considered publishing a comprehensive book explaining those subjects? (I am trying to read all the material online, but books are easier to read and don't require sitting in front of a computer to do so. Plus I can write in books :-). )
I've thought about writing extended tutorials on the relationship between Haskell programming and category theory but there's a problem I run into. It's tempting to make the identifications: types<->objects, Haskell function<->arrows, suitably polymorphic functions<->natural transformations, and so on. But the fact is, this doesn't really work in the obvious way even though it seems like it should at first (eg. Haskell functions aren't always total functions in the mathematical sense and if you allow partial functions you can do weird stuff). So either: (1) we need some technical work to patch up the differences (and unfortunately I don't know what the patch-up is), (2) we restrict ourselves to certain types of Haskell function for which the theory works or (3) we deliberately leave things a little vague. I usually tend to go for option (3), but that wouldn't be satisfactory for an extended treatment. Has anyone else given this subject much thought? -- Dan

On 3/27/07, Dan Piponi
On 3/27/07, Dave@haskell.org
wrote: Given the amount of material posted at haskell.org and elsewhere explaining IO, monads and functors, has anyone considered publishing a comprehensive book explaining those subjects? (I am trying to read all the material online, but books are easier to read and don't require sitting in front of a computer to do so. Plus I can write in books :-). )
I've thought about writing extended tutorials on the relationship between Haskell programming and category theory but there's a problem I run into. It's tempting to make the identifications: types<->objects, Haskell function<->arrows, suitably polymorphic functions<->natural transformations, and so on. But the fact is, this doesn't really work in the obvious way even though it seems like it should at first (eg. Haskell functions aren't always total functions in the mathematical sense and if you allow partial functions you can do weird stuff). So either:
(1) we need some technical work to patch up the differences (and unfortunately I don't know what the patch-up is), (2) we restrict ourselves to certain types of Haskell function for which the theory works or (3) we deliberately leave things a little vague.
I usually tend to go for option (3), but that wouldn't be satisfactory for an extended treatment.
Has anyone else given this subject much thought?
I consider myself to be distinctly in the target audience of a thorough treatment of CT & it's relationship to Haskell, so I'll throw out there that I think some superposition of options (2) and (3) would be the most satisfying. You can handwave a little bit, but knowing *where* the naive mappings between category theoretic constructs and Haskell's system breakdown would be very nice. Personally, one of the biggest things for me is not really having any intuition for what kind of category the Haskell type system lives in. I mean, it looks cartesian closed because you can do currying but what more to it is there than that?

Creighton Hogg wrote:
On 3/27/07, *Dan Piponi*
mailto:dpiponi@gmail.com> wrote: On 3/27/07, Dave@haskell.org mailto:Dave@haskell.org
mailto:Dave@haskell.org> wrote: > Given the amount of material posted at haskell.org http://haskell.org and elsewhere > explaining IO, monads and functors, has anyone considered publishing > a comprehensive book explaining those subjects? (I am trying to > read all the material online, but books are easier to read and don't > require sitting in front of a computer to do so. Plus I can write in > books :-). ) I've thought about writing extended tutorials on the relationship between Haskell programming and category theory but there's a problem I run into. It's tempting to make the identifications: types<->objects, Haskell function<->arrows, suitably polymorphic functions<->natural transformations, and so on. But the fact is, this doesn't really work in the obvious way even though it seems like it should at first (eg. Haskell functions aren't always total functions in the mathematical sense and if you allow partial functions you can do weird stuff). So either:
(1) we need some technical work to patch up the differences (and unfortunately I don't know what the patch-up is), (2) we restrict ourselves to certain types of Haskell function for which the theory works or (3) we deliberately leave things a little vague.
I usually tend to go for option (3), but that wouldn't be satisfactory for an extended treatment.
Has anyone else given this subject much thought?
I consider myself to be distinctly in the target audience of a thorough treatment of CT & it's relationship to Haskell, so I'll throw out there that I think some superposition of options (2) and (3) would be the most satisfying. You can handwave a little bit, but knowing *where* the naive mappings between category theoretic constructs and Haskell's system breakdown would be very nice. Personally, one of the biggest things for me is not really having any intuition for what kind of category the Haskell type system lives in. I mean, it looks cartesian closed because you can do currying but what more to it is there than that?
Actually it isn't Cartesian Closed (monoidally closed though should work). But, I more or less agree. Either just ignore it (3), or something somewhere between (2) and (3) would probably be best. The kind of people that are going to care enough about the mismatches probably already know to be wary, but make sure you make -some- comment to the appropriate effect. Most of the time you are just going for intuition and (either way) precision in this aspect is irrelevant. A request: If you do write this, please show the CT being -used- for something and not just mapped to/from Haskell.

Haskell borrows from CT but it is too much engineered to be a model for computational CT. However you can study it with CT: http://www.cs.ut.ee/~varmo/papers/thesis.pdf

I've thought about writing extended tutorials on the relationship between Haskell programming and category theory
you might find this a useful reference/starting point then: http://citeseer.ist.psu.edu/62964.html An Introduction to Category Theory, Category Theory Monads, and Their Relationship to Functional Programming Jonathan M.D. Hill, Keith Clarke it's been a long time since i read this, and i seem to recall having to fix a few typos before things made sense, but the reference still stuck in memory:) claus

Dave-86 wrote:
Given the amount of material posted at haskell.org and elsewhere explaining IO, monads and functors, has anyone considered publishing a comprehensive book explaining those subjects? (I am trying to read all the material online, but books are easier to read and don't require sitting in front of a computer to do so. Plus I can write in books :-). )
Thanks, Dave Feustel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Print out the wikibook [1]? IMO it has good coverage of Monads, more detailed than any of the textbooks I've read, and leads into CT and advanced topics that aren't really covered in any of the books (partly because a lot of it isn't Haskell 98 of course). [1] http://en.wikibooks.org/wiki/Haskell -- View this message in context: http://www.nabble.com/Monad-Functor-Book-tf3474082.html#a9752877 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
participants (7)
-
unknown@example.com
-
Andrzej Jaworski
-
Claus Reinke
-
Creighton Hogg
-
Dan Piponi
-
Derek Elkins
-
jim burton