[Haskell-cafe] Re: Relevance and applicability of category theory

apfelmus apfelmus at quantentunnel.de
Thu Jan 31 04:03:42 EST 2008


aaltman wrote:
> 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.+2. The stumbling block is probably that Hask has exponentials and 
polymorphism. Hence, all morphisms and even natural transformations 
can/are internalized, i.e. they are objects in Haskell themselves.

2. The  Functor  class is for endofunctors only.

3. Arrows depart from  Functor  and  Monad  by giving rise to categories 
  different from Hask. In other words, while morphisms and objects are 
both objects of Hask, the morphisms are not longer plain functions. A 
simple example (not of  Arrows  but of the "not a subcategory of Hask" 
phenomenon) is

   class Category hom where
      id  :: hom a a
      (.) :: hom b c -> hom a b -> hom a c

   newtype Monoid m => Mon m a b = Mon m

   instance Monoid m => Category (Mon m) where
      id                = Mon mempty
      (Mon f) . (Mon g) = Mon (f `mappend` g)



Regards,
apfelmus



More information about the Haskell-Cafe mailing list