[Haskell-cafe] Relevance and applicability of category theory

Aaron Altman aaltman at pdx.edu
Wed Jan 30 21:33:26 EST 2008

David's post looks like it has cleared up what I was wondering about.  I 
think it was the specific contents of Ob(Hask) and Haskell functions as 
arrows in Hask that I was unclear on.  With that in mind I understand 
and agree with Miguel's explanations.  Thanks, guys.

Dan Weston wrote:
> I assume you have read the references in
> http://www.haskell.org/haskellwiki/Research_papers/Monads_and_arrows
> The penultimate sentence in question 1 below (role of adjoint functors 
> in Haskell monads) was addressed by David Menendez in a recent post to 
> this list:
> http://www.haskell.org/pipermail/haskell-cafe/2007-December/036361.html
> There was discussion of Category theory monad <----> Haskell monad 
> subsequent to the thread
> http://www.haskell.org/pipermail/haskell-cafe/2005-August/011021.html
> A categorical approach to graph transformations with Haskell is 
> described in:
> http://philippsen.com/Personen/schneide/gtbook/appendix-a.pdf?language=de
> There are several Haskell modules (named e.g. Category) floating 
> around that attempt to better reflect categorical usage in Haskell, 
> but I do not have a reference handy.
> Dan
> aaltman at pdx.edu wrote:
>> Category theory seems to have an inconsistent relationship to Haskell 
>> - both documentation and the language's implementations of 
>> categorical concepts.  I come from a math background that makes the 
>> Haskell's tight coupling to its mathematical foundation very 
>> appealing.  But, I may have found some inconsistencies.  Whether you 
>> agree or not I hope we can get some discussion going that will 
>> clarify the wikibooks, etc.
>> My issues:
>> 1. Are Haskell monads useful in a truly categorical sense?
>> 2. Is Haskell's functor class misnamed?
>> 3. Haskell arrows and Haskell monads have a misleading relationship
>> 1. Categorical monads are a class of functors, that is, morphisms on 
>> Cat.  Haskell's monads are at least a bit closer to the categorical 
>> idea than Haskell's functors by virtue of having the same domain and 
>> codomain: Hask -> Hask.  I think applicability of Haskell monads 
>> beyond sequencing computation, and the validity of their definition, 
>> would be much more clear if someone explained the meaning of adjoint 
>> functors to and from Hask.  In other words, provide the mathematical 
>> characterization to make Haskell monads a precise representation of 
>> categorical monads on Hask.
>> 2. Functors are structure preserving maps in the category Cat.  The 
>> Haskell Functor class represents structure preserving maps in the 
>> category Hask, which seem to me more like the categorical notion of 
>> arrows or the algebraic notion of homomorphisms.  If we talk about 
>> functors relating to Haskell, it seems more likely we'd be referring 
>> to functors to or from the category Hask than functions (or arrows or 
>> whatever) between elements of Hask.  Maybe categorical functors are 
>> useful as an abstract characterization of programs themselves: a 
>> program defines a functor from the problem domain into Hask, or from 
>> Hask into output in a problem domain.  The name "Arrow" is already 
>> taken; what about renaming Functor to Automorphism?
>> 3. I believe the documentation stating that Haskell arrows are a 
>> generalization of Haskell monads, but arrows are a categorical thing 
>> too and in that context bear a much more distant relationship to 
>> monads.  Does a Haskell arrow have Hask as domain and codomain?  Or 
>> is one particular element in Hask its domain and possibly another its 
>> codomain?  Those are not at all the same thing.
>> My guess is that the concept of Hask is too murky to be any use right 
>> now.  The documentation may be more clear by avoiding it until we 
>> work out a formal definition... or is there one already?
>>  - Aaron Altman
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list