No subject


Tue Nov 30 21:47:11 CET 2010


s explanation how Reader
=0Ais constructed step-by-step.

As far as I know, there has been code for Reader monad in Haskell Wiki. Unf=
ortunately,
after it has been migrated, "page not found" error has become not very unco=
mmon on it, and
=0Aeither i was not able to found it, or it really is missing.

Out of practical considerations, library authors decided to define more com=
plicated ReaderT monad transformer,=20
because it can be made to behave as Reader if the former wraps Identity mon=
ad.
=0A
Hope this helps.

=0A=0A=0A=0A      
--0-801293533-1293647411=:61275
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"=
top" style=3D"font: inherit;">Hi, Michael.<br><br>Yes, I'd already noticed =
that ReaderT preceded Reader. Guess I'll have to check out the Indentity mo=
nad too. I hope it's not dependent upon yet another monad.&nbsp; ;-)<br><br=
>Thanks for the link. I go there a lot.<br><br>Michael<br><br>--- On <b>Wed=
, 12/29/10, Michael Lazarev <i>&lt;lazarev.michael at gmail.com&gt;</i></b> wr=
ote:<br><blockquote style=3D"border-left: 2px solid rgb(16, 16, 255); margi=
n-left: 5px; padding-left: 5px;"><br>From: Michael Lazarev &lt;lazarev.mich=
ael at gmail.com&gt;<br>Subject: Re: [Haskell-cafe] Reader monad<br>To: "micha=
el rice" &lt;nowgate at yahoo.com&gt;<br>Cc: haskell-cafe at haskell.org<br>Date:=
 Wednesday, December 29, 2010, 12:42 PM<br><br><div id=3D"yiv861588006"><br=
><br>2010/12/29 michael rice &lt;<a rel=3D"nofollow" ymailto=3D"mailto:nowg=
ate at yahoo.com" target=3D"_blank"
 href=3D"/mc/compose?to=3Dnowgate at yahoo.com">nowgate at yahoo.com</a>&gt;<br>&=
gt;<br>&gt; From the docs (and tuts) newtype creates a new type out of an e=
xisting type<br>&gt; and gives a single constructor for doing so.<br>=0A&gt=
;<br>&gt; what is the existing type?<br><br><br>Michael, you may want to se=
e this section:<br><a rel=3D"nofollow" target=3D"_blank" href=3D"http://lea=
rnyouahaskell.com/functors-applicative-functors-and-monoids#the-newtype-key=
word">http://learnyouahaskell.com/functors-applicative-functors-and-monoids=
#the-newtype-keyword</a><br>=0Aand also section titled "type vs. newtype vs=
. data" below. It has good explanation why there is<br>at least three keywo=
rds in Haskell to define types, and which of them do what. And how they do =
it.<br><br>From my experience, this book in a whole could be useful to you.=
 It also has explanation how Reader<br>=0Ais constructed step-by-step.<br><=
br>As far as I know, there has been code for Reader monad in Haskell Wiki. =
Unfortunately,<br>after it has been migrated, "page not found" error has be=
come not very uncommon on it, and<br>=0Aeither i was not able to found it, =
or it really is missing.<br><br>Out of practical considerations, library au=
thors decided to define more complicated ReaderT monad transformer, <br>bec=
ause it can be made to behave as Reader if the former wraps Identity monad.=
<br>=0A<br>Hope this helps.<br><br>=0A</div></blockquote></td></tr></table>=
<br>=0A=0A      
--0-801293533-1293647411=:61275--



More information about the Haskell-Cafe mailing list