6 ms·
I think this is for people that already know how to use monads effectively in Haskell and wants to learn more about the mathematical background.
by effn 13y ago
I think this is for people that already know how to use monads effectively in Haskell and wants to learn more about the mathematical background.
- freyrs3 13y agoThis is explicitly not a writeup for beginners ( ergo the title ), it's a side-by-side description of the /very/ general categorical description and how you can model that in Haskell. The three parameter form of morphism composition ( i.e. c y z -> c x y -> c x z ) would be quite unwieldy in day-to-day programming but it does illustrate the underlying definitions better to have categories explicit.
- trobertson 13y agoI don't mean to nitpick, but the three parameter form is exactly what you use in day-to-day Haskell programming. You simply let c be the infix (->), and you get (y -> z) -> (x -> y) -> (x -> z). We just tend to think of it as a two parameter form because a lot of the time, you can think of (->) as syntax, as opposed to the type that it is.
- lelf 13y agoYup. This is straight cut from Control.Category module: instance Category (->) where id = Prelude.id (.) = (Prelude..)
- tome 13y agoThat's pretty much my point: I don't think mathematical monads are a good background for Haskell Monads. It's a bit like saying the ZF axioms are the mathematical background for Data.Set.
- jfarmer 13y agoIt's great for two classes of people: those who understand monads from a Haskell/software engineering perspective and want to learn the mathematical perspective, and those like me who understand them from the mathematical perspective and want to learn them from the Haskell/software engineering perspective. Given that, I think it's great! :D