No subject


Tue Nov 30 21:47:11 CET 2010


explanation how Reader
is constructed step-by-step.

As far as I know, there has been code for Reader monad in Haskell Wiki.
Unfortunately,
after it has been migrated, "page not found" error has become not very
uncommon on it, and
either i was not able to found it, or it really is missing.

Out of practical considerations, library authors decided to define more
complicated ReaderT monad transformer,
because it can be made to behave as Reader if the former wraps Identity
monad.

Hope this helps.

--00163616494fee7cf304989018fd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br>2010/12/29 michael rice &lt;<a href=3D"mailto:nowgate at yahoo.com">no=
wgate at yahoo.com</a>&gt;<br>&gt;<br>&gt; From the docs (and tuts) newtype cr=
eates a new type out of an existing type<br>&gt; and gives a single constru=
ctor for doing so.<br>
&gt;<br>&gt; what is the existing type?<br><br><br>Michael, you may want to=
 see this section:<br><a href=3D"http://learnyouahaskell.com/functors-appli=
cative-functors-and-monoids#the-newtype-keyword">http://learnyouahaskell.co=
m/functors-applicative-functors-and-monoids#the-newtype-keyword</a><br>
and also section titled &quot;type vs. newtype vs. data&quot; below. It has=
 good explanation why there is<br>at least three keywords in Haskell to def=
ine types, and which of them do what. And how they do it.<br><br>From my ex=
perience, this book in a whole could be useful to you. It also has explanat=
ion how Reader<br>
is constructed step-by-step.<br><br>As far as I know, there has been code f=
or Reader monad in Haskell Wiki. Unfortunately,<br>after it has been migrat=
ed, &quot;page not found&quot; error has become not very uncommon on it, an=
d<br>
either i was not able to found it, or it really is missing.<br><br>Out of p=
ractical considerations, library authors decided to define more complicated=
 ReaderT monad transformer, <br>because it can be made to behave as Reader =
if the former wraps Identity monad.<br>
<br>Hope this helps.<br><br>

--00163616494fee7cf304989018fd--



More information about the Haskell-Cafe mailing list