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: GHCi won't allow type declaration as shown in LYAHFGG (Keshav Kini) 2. Re: GHCi won't allow type declaration as shown in LYAHFGG (Homero Cardoso de Almeida) 3. Re: How to solve this using State Monad? (Rustom Mody) ---------------------------------------------------------------------- Message: 1 Date: Thu, 31 May 2012 14:16:04 -0700 From: Keshav Kini <keshav.k...@gmail.com> Subject: Re: [Haskell-beginners] GHCi won't allow type declaration as shown in LYAHFGG To: beginners@haskell.org Message-ID: <86r4u09hm3....@zhenghe.ntu.edu.sg> Content-Type: text/plain; charset=us-ascii Stan Kulp <stan_k...@yahoo.com> writes: > I have been working my way through "Learn You a Haskell for Greater Good" and > am stumped when I get to the "Syntax in Functions - Pattern Matching" section. > > The book shows the following expression... > > ghci> lucky :: (Integral a) => a -> String As far as I can see, the live version of `the section you mention`_ on learnyouahaskell.com does not contain this text - it doesn't have the "ghci> " at the beginning of the line. Besides what others have said in response to your question, I would add that you should make sure to read LYAH on the website if possible - other sources might be out of date, as I think the author does update the website version from time to time. .. _the section you mention: http://learnyouahaskell.com/syntax-in-functions#pattern-matching -Keshav ------------------------------ Message: 2 Date: Thu, 31 May 2012 19:45:56 -0300 From: Homero Cardoso de Almeida <homero...@gmail.com> Subject: Re: [Haskell-beginners] GHCi won't allow type declaration as shown in LYAHFGG To: Keshav Kini <keshav.k...@gmail.com> Cc: beginners@haskell.org Message-ID: <capv0zwq_sw2lx+dndv3osm8ijjopqzcgk9s4w8yfwdpbi86...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" I just tried here, and got no problems. lucky.hs: lucky :: (Integral a) => a -> String lucky 7 = "LUCKY NUMBER SEVEN!!!" lucky x = "Sorry, you're out of luck, pal..." ghci: :load "/path/to/lucky.hs" [1 of 1] Compiling Main ( /path/to/lucky.hs, interpreted ) Ok, modules loaded: Main. *Main> lucky 7 "LUCKY NUMBER SEVEN!!!" *Main> lucky 200 "Sorry, you're out of luck, pal..." *Main> I would suggest verifying my ghc installation or for any "funky" chars in the file. Homero Cardoso de Almeida On Thu, May 31, 2012 at 6:16 PM, Keshav Kini <keshav.k...@gmail.com> wrote: > Stan Kulp <stan_k...@yahoo.com> writes: > > I have been working my way through "Learn You a Haskell for Greater > Good" and > > am stumped when I get to the "Syntax in Functions - Pattern Matching" > section. > > > > The book shows the following expression... > > > > ghci> lucky :: (Integral a) => a -> String > > As far as I can see, the live version of `the section you mention`_ on > learnyouahaskell.com does not contain this text - it doesn't have the > "ghci> " at the beginning of the line. Besides what others have said in > response to your question, I would add that you should make sure to read > LYAH on the website if possible - other sources might be out of date, as > I think the author does update the website version from time to time. > > .. _the section you mention: > http://learnyouahaskell.com/syntax-in-functions#pattern-matching > > -Keshav > > > _______________________________________________ > 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/20120531/97815794/attachment-0001.htm> ------------------------------ Message: 3 Date: Fri, 1 Jun 2012 08:58:01 +0530 From: Rustom Mody <rustompm...@gmail.com> Subject: Re: [Haskell-beginners] How to solve this using State Monad? To: Ertugrul S?ylemez <e...@ertes.de> Cc: beginners@haskell.org Message-ID: <caj+teof7fz-tmoctfxcpknep54+i96+fwjtcsxzi47ppyq4...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" On Thu, May 31, 2012 at 9:48 PM, Ertugrul S?ylemez <e...@ertes.de> wrote: > > I have started an arrow tutorial which many people found easy to follow. > It's not finished yet, but since so many people found it useful I'm > sharing that unfinished tutorial: > > <http://ertes.de/new/tutorials/arrows.html> > > It answers the most important questions: What? Why? How? To some > extent it also answers: When? But I have to work on that question. > Hi Ertugrul, As usual this is useful and I'll be studying it in more detail. For now a general question: What do you think of *teaching* Haskell replacing monads with arrows in the early introduction? Rusi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120601/aaeffbd0/attachment-0001.htm> ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 48, Issue 1 ****************************************