[Haskell-cafe] Reader monad
michael rice
nowgate at yahoo.com
Wed Dec 29 19:30:11 CET 2010
Hi, Michael.
Yes, I'd already noticed that ReaderT preceded Reader. Guess I'll have to check out the Indentity monad too. I hope it's not dependent upon yet another monad. ;-)
Thanks for the link. I go there a lot.
Michael
--- On Wed, 12/29/10, Michael Lazarev <lazarev.michael at gmail.com> wrote:
From: Michael Lazarev <lazarev.michael at gmail.com>
Subject: Re: [Haskell-cafe] Reader monad
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Wednesday, December 29, 2010, 12:42 PM
2010/12/29 michael rice <nowgate at yahoo.com>
>
> From the docs (and tuts) newtype creates a new type out of an existing type
> and gives a single constructor for doing so.
>
> what is the existing type?
Michael, you may want to see this section:
http://learnyouahaskell.com/functors-applicative-functors-and-monoids#the-newtype-keyword
and also section titled "type vs. newtype vs. data" below. It has good explanation why there is
at least three keywords in Haskell to define types, and which of them do what. And how they do it.
More information about the Haskell-Cafe
mailing list