Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Haskell and Category Theory (Rustom Mody)
   2. Re:  Haskell and Category Theory (Joe Fredette)
   3. Re:  Effective use of nested Monads (David Hinkes)


----------------------------------------------------------------------

Message: 1
Date: Mon, 11 Feb 2013 19:01:51 +0530
From: Rustom Mody <rustompm...@gmail.com>
Subject: Re: [Haskell-beginners] Haskell and Category Theory
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Message-ID:
        <CAJ+Teoc=yn9awi-7onoclppiywz+rv__wiejhtgdvd_0bp_...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Mon, Feb 11, 2013 at 10:37 AM, Brent Yorgey <byor...@seas.upenn.edu>wrote:

> On Sun, Feb 10, 2013 at 12:44:11PM -0500, Patrick Lynch wrote:
> > Good morning,
> > I've tried to read 5 books on Category Theory and finally have admitted
> defeat.
> > What I'm looking for is simply a book that is geared to Haskell and
> Category that can be understood by mere mortals.
> > I was trained as an Electrical Engineer, so my math is quite good, but I
> just don't get Category Theory from these books.
> > If anyone can recomment a book on Category Theory and Haskell, written
> by a Computer Scientest [no more Mathematicians for me], I welcome it.
> > Thanks,
> > Patrick
>
> Can you tell us which books you've tried to read?
>
> -Brent
>

Well Brent is not going to say it I guess so someone needs to:
Typeclassopedia http://www.haskell.org/haskellwiki/Typeclassopedia
is required reading
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130211/b8a154b7/attachment-0001.htm>

------------------------------

Message: 2
Date: Mon, 11 Feb 2013 08:47:37 -0500
From: Joe Fredette <jfred...@gmail.com>
Subject: Re: [Haskell-beginners] Haskell and Category Theory
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Message-ID: <e437ea88-0456-4669-bddc-feece93fd...@gmail.com>
Content-Type: text/plain; charset="iso-8859-1"


While we await a reply, I will say that I found Benjamin Pierce's "Basic 
Category Theory for Computer Scientists" pretty readable,  but will also 
readily admit my understanding of CT is not particularly deep or great. There 
are also some videos on youtube, particularly by [error792](1) which are worth 
watching, though they approach from a more math-oriented perspective (the 
video-author is a Mathematics Grad Student).

One thing that helped me a lot was learning a bit about Combinatorial Species 
-- I come from a math background, so having something firmly abstract to grab 
onto wrt examples of CT in use was (and is) useful, Brent has a [nice suite of 
posts](2) on the matter, and I'm sure will have some book/paper 
recommendations, I linked to just one of the posts on his blog, I'm sure you 
can navigate to the others. 

The trick, I think, to learning CT is to realize it's a lot like Set theory -- 
there's a lot of abstract nonsense and definition shuffling (which error792's 
videos, iirc, note as "Soft Theorems"), and very little (immediate) connection 
to reality/more concrete tools. However, CT provides a framework of 
understanding which acts kind of like a highway-of-abstraction. When I can say, 
"A combinatorial species _is_ an endofunctor on the category of Sets and their 
Bijections", I necessarily know that if I can translate that category into 
another thing, then I can use my knowledge of species to inform my knowledge of 
that thing.

I'm probably telling this story wrong in some way, perhaps (if we don't mind a 
bit of thread hijacking) someone can improve my understanding of CT by 
correcting my likely and inevitable mistakes.

/Joe


(1) http://www.youtube.com/user/error792

(2) http://byorgey.wordpress.com/2012/11/20/combinatorial-species-definition/


> 
> 
> On Mon, Feb 11, 2013 at 10:37 AM, Brent Yorgey <byor...@seas.upenn.edu> wrote:
> On Sun, Feb 10, 2013 at 12:44:11PM -0500, Patrick Lynch wrote:
> > Good morning,
> > I've tried to read 5 books on Category Theory and finally have admitted 
> > defeat.
> > What I'm looking for is simply a book that is geared to Haskell and 
> > Category that can be understood by mere mortals.
> > I was trained as an Electrical Engineer, so my math is quite good, but I 
> > just don't get Category Theory from these books.
> > If anyone can recomment a book on Category Theory and Haskell, written by a 
> > Computer Scientest [no more Mathematicians for me], I welcome it.
> > Thanks,
> > Patrick
> 
> Can you tell us which books you've tried to read?
> 
> -Brent
> 
> Well Brent is not going to say it I guess so someone needs to:
> Typeclassopedia http://www.haskell.org/haskellwiki/Typeclassopedia
> is required reading
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130211/7d75e152/attachment-0001.htm>

------------------------------

Message: 3
Date: Mon, 11 Feb 2013 10:30:56 -0800
From: David Hinkes <david.hin...@gmail.com>
Subject: Re: [Haskell-beginners] Effective use of nested Monads
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Message-ID:
        <CA+_CxFPpwmW9X6WJ8b6JSA8=ejwafhe+goqztiojcfcz9+7...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Sun, Feb 10, 2013 at 9:17 PM, Brent Yorgey <byor...@seas.upenn.edu>wrote:

> On Sun, Feb 10, 2013 at 02:53:18PM -0800, David Hinkes wrote:
> > Hi haskell-beginners,
> >
> > I'm starting to come to the idea of exposing a Monad as a means of
> > controlling an API.  So, I've started creating my own Monad data types
> > based on classical monads.  However, I'm running into a problem regarding
> > creating monad definitions when using nested Monads.
> >
> > For example:
> >
> > newtype Example m o = Example {
> >   runExample :: State Int (m o)
> > }
> >
> > Is there a clean way to make Example a monad?
>
> Actually, there isn't!  This is one way in which monads turn out to be
> *too* powerful: they don't compose very well.  If m and n are monads,
> then their composition (that is, a type like newtype Composed a =
> Composed (m (n a))) is *not* necessarily a monad!  So "nesting" monads
> in this way is usually not a good idea.
>
> What you want are called "monad transformers", which give you a way to
> "compose" certain monads (though it's more complicated than just
> nesting them).  You can do your Example type something like this:
>
>   newtype Example m o = Example {
>     runExample :: StateT Int m o
>   }
>
> where StateT is the State monad transformer, defined in the
> 'transformers' package (and also exported from the 'mtl' package).  I
> refer you to the typeclassopedia for more information and links to
> further reading:
>
  http://www.haskell.org/haskellwiki/Typeclassopedia#Monad_transformers


Thanks Brent, I'll try to  re-organize around the transforms.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130211/7c6272bc/attachment-0001.htm>

------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 56, Issue 20
*****************************************

Reply via email to