tag:blogger.com,1999:blog-11295132.post114678350869465376..comments2024-02-24T01:46:31.188-08:00Comments on A Neighborhood of Infinity: Grok Haskell Monad Transformerssigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-11295132.post-72059186278182767112012-01-19T18:58:42.401-08:002012-01-19T18:58:42.401-08:00Here's another nice and thorough and typeset :...Here's another nice and thorough and typeset :-) tutorial, posted shortly after sigfpe's original:<br /><br /><br />http://www.grabmueller.de/martin/www/pub/Transformers.en.htmlMichael Rogerhttps://www.blogger.com/profile/08729150476888743293noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-40734417477086348492011-07-20T17:19:53.216-07:002011-07-20T17:19:53.216-07:00Can not agree more with your comments on those fak...Can not agree more with your comments on those fake tutorials. This is just what I want to know. After using that for few weeks, I will begin to understand what Transformer really is.雪夜读书https://www.blogger.com/profile/08397652907635644020noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-30839617990556123292011-07-20T17:18:03.479-07:002011-07-20T17:18:03.479-07:00Can not agree any more with your comments on those...Can not agree any more with your comments on those egghead's explanation on Monad Transformers. Thanks a lot. Really what I want to know.雪夜读书https://www.blogger.com/profile/08397652907635644020noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-71866288578736208892010-11-30T22:24:14.922-08:002010-11-30T22:24:14.922-08:00Yeah, I'm going to have to agree with sigfpe.....Yeah, I'm going to have to agree with sigfpe... it's really just up to you how you want to do it. Sometimes multiple solutions stink!Mitchellhttp://magnetechtransformerrepair.com/noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-49204513144312846612009-03-25T23:16:00.000-07:002009-03-25T23:16:00.000-07:00For those wondering why you would want to use this...For those wondering why you would want to use this: as an example, I'm trying to implement Ruby Quiz 19 (Yahtzee). How am I supposed to set up an interactive loop with the user and save the current score and random state (for die rolls) throughout the loop? You can't do IO () stuff like putStrLn to show dice rolls while using State (Score,StdGen) x because your return type is no longer IO (). But with something like the test5 example, it's now entirely possible. A terrible workaround would've been to use IO () to read/write the state to a file... Now I can StateT (Score,StdGen) IO () and all is solved.Sean Kanaleyhttps://www.blogger.com/profile/06567427255740163613noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-20839331255368603432009-02-21T16:10:00.000-08:002009-02-21T16:10:00.000-08:00chessguy,It's up to you. If you're bothered by the...chessguy,<BR/><BR/>It's up to you. If you're bothered by the lack of symmetry from having a StateT and a State then you can use the Identitiy monad.sigfpehttps://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-11102089682385722842009-02-21T15:44:00.000-08:002009-02-21T15:44:00.000-08:00Hmm, do you really need to wrap this around Identi...Hmm, do you really need to wrap this around Identity? Can't you just stack StateT on top of State to just get sort of a DoubleState monad?chessguyhttps://www.blogger.com/profile/08385143488045909734noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-51570233086419271682008-03-23T13:16:00.000-07:002008-03-23T13:16:00.000-07:00This post is really great. Thanks!This post is really great. Thanks!Tenerhttps://www.blogger.com/profile/06657309948578892831noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-69055135188166591782007-12-03T06:44:00.000-08:002007-12-03T06:44:00.000-08:00Very helpful post, thanks!One thing - did you mean...Very helpful post, thanks!<BR/><BR/>One thing - did you mean to say "Try :type test3 in ghci." rather than :type go3 ?<BR/><BR/>The latter just yields:<BR/>go3 :: (Integer, [Char])yaxuhttps://www.blogger.com/profile/15563877134268148264noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-26115037759085048562007-05-25T17:44:00.000-07:002007-05-25T17:44:00.000-07:00Tim,Exactly. Except that if you just have two type...Tim,<BR/><BR/>Exactly. Except that if you just have two types then one can be an ordinary monad, and the other can be a monad transformer. Or you can use three levels where both the reader and the writer are monad transformers and they are applied to the identity monad. (I do the former in this post.)sigfpehttps://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-32256251472865616952007-05-25T17:09:00.000-07:002007-05-25T17:09:00.000-07:00So, if I wanted two kinds of state, one readable a...So, if I wanted two kinds of state, one readable and one readable and writable, I could wrap a StateT in a ReaderT? Or vice versa?Tim Stewarthttps://www.blogger.com/profile/09462164199588340287noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-48273188198818473282007-04-26T23:22:00.000-07:002007-04-26T23:22:00.000-07:00I STILL can't think of one real-world reason why I...I <B>STILL</B> can't think of one real-world reason why I'd want to use one. I just don't get it (yet).Samuel A. Falvo IIhttps://www.blogger.com/profile/11523132404727383627noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-28111305479341102552007-04-09T06:41:00.000-07:002007-04-09T06:41:00.000-07:00Thanks. I found this quite useful.Thanks. I found this quite useful.jtohttps://www.blogger.com/profile/03968844388108605008noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-79828049292792541062007-04-06T16:09:00.000-07:002007-04-06T16:09:00.000-07:00Thanks. Great post.Thanks. Great post.jtohttps://www.blogger.com/profile/03968844388108605008noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-1155692839548629432006-08-15T18:47:00.000-07:002006-08-15T18:47:00.000-07:00Pete,I was going to post this very example on the ...Pete,<BR/><BR/>I was going to post this very example on the Haskell Wiki but I had trouble figuring out how to do this. I'm happy for you to do it. If you want, add a link back to here.<BR/><BR/>If I remember I'll write an example that doesn't use 'lift' and post it here. Otherwise search for "Looking for basic state transformer example" on USENET where I first posted an example. (The title of the USENET post is wrong, I meant to say "monad" but said "state" by accident.)sigfpehttps://www.blogger.com/profile/08096190433222340957noreply@blogger.com