
Oke, I tried with Ghci 7.03 on the prompt but then I see this: [x^2 | x <-- [1..100] not in scope x not in scope <-- When I put the text in a file I see these errors. parse error : naked expression at top level. Roelof
----------------------------------------
Date: Wed, 13 Jul 2011 23:04:58 +0200 From: andres.loeh@googlemail.com To: beginners@haskell.org Subject: Re: [Haskell-beginners] question
I've just tried to evaluate 2 ^ 5 in codepad and it worked for me, so (^) seems to be supported.
Cheers, Andres
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Hi. On wich system are you using GHCi ? Probably I missed this information from the previous mail. I'm using GHC 7.0.4 on MacOS X 10.6.8 (Xcode 4) and all works fine with [x^2 | x <- [1..10]]. You can try to see if you installation of ghc is ok typing "ghc-pkg list" from a console, or using the command ghc -v to see if there are some strange notification. Luca. On Jul 14, 2011, at 9:55 AM, Roelof Wobben wrote:
Oke,
I tried with Ghci 7.03 on the prompt but then I see this:
[x^2 | x <-- [1..100]
not in scope x not in scope <--
When I put the text in a file I see these errors.
parse error : naked expression at top level.
Roelof
----------------------------------------
Date: Wed, 13 Jul 2011 23:04:58 +0200 From: andres.loeh@googlemail.com To: beginners@haskell.org Subject: Re: [Haskell-beginners] question
I've just tried to evaluate 2 ^ 5 in codepad and it worked for me, so (^) seems to be supported.
Cheers, Andres
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

The first problem I see is that "x <--" is wrong... it should be just x <-,
a single hyphen.
On 14 Jul 2011 09:18, "Luca Ciciriello"
Oke,
I tried with Ghci 7.03 on the...

Hello That was the problem. When I do <- instead of <-- I see outcome. So this problem is also solved. Everyone thanks for the help and patience. Roelof ________________________________
Date: Thu, 14 Jul 2011 09:25:33 +0100 Subject: Re: [Haskell-beginners] FW: question From: edwards.benj@gmail.com To: luca_ciciriello@hotmail.com CC: beginners@haskell.org; rwobben@hotmail.com
The first problem I see is that "x <--" is wrong... it should be just x <-, a single hyphen.
On 14 Jul 2011 09:18, "Luca Ciciriello"
mailto:luca_ciciriello@hotmail.com> wrote: Hi. On wich system are you using GHCi ? Probably I missed this information from the previous mail.
I'm using GHC 7.0.4 on MacOS X 10.6.8 (Xcode 4) and all works fine with [x^2 | x <- [1..10]].
You can try to see if you installation of ghc is ok typing "ghc-pkg list" from a console, or using the command ghc -v to see if there are some strange notification.
Luca.
On Jul 14, 2011, at 9:55 AM, Roelof Wobben wrote:
Oke,
I tried with Ghci 7.03 on the...

Hi Roelof,
I don't want to come across as rude here, and I am sure the rest of the list
will shoot me down if I do, but you had a number of people trying to
diagnose a problem caused mostly by a failure on your part to type out
correctly what you have read. You are going to find it very hard to make
meaningful progress in your quest to learn Haskell if you don't take the
time to at least learn the basic syntax of the language before coming to the
mailing lists for help.
Best,
Ben
On 14 Jul 2011 10:48, "Roelof Wobben"
Date: Thu, 14 Jul 2011 09:25:33 +0100 Subject: Re: [Haskell-beginners] FW: question From: edwards.benj@gmail.com To: luca_ciciriello@hotmail.com CC: beginners@haskell.org; rwobben@hotmail.com
The first problem I see is that "x <--" is wrong... it should be just x <-, a single hyph...
mailto:luca_ciciriello@hotmail.com>
wrote:
Hi. On wich system are you using GHCi ? Probably I missed this information from...
_______________________________________________ Beginners mailing list Beginners@haskell.org http://...

On Thu, Jul 14, 2011 at 6:16 AM, Benjamin Edwards
Hi Roelof,
I don't want to come across as rude here, and I am sure the rest of the list will shoot me down if I do, but you had a number of people trying to diagnose a problem caused mostly by a failure on your part to type out correctly what you have read. You are going to find it very hard to make meaningful progress in your quest to learn Haskell if you don't take the time to at least learn the basic syntax of the language before coming to the mailing lists for help.
I agree, but here's something I'd like to point out: IIRC, Roelof uses "Programming in Haskell" as his learning material. One thing that I found confusing in that book (and in other books as well), is that the authors insist on using LaTeX mathematical symbols in Haskell code instead of "valid Haskell syntax". For example, in the exact example from the book that Roelof is trying to understand: [x^2 | x <- [1..5]] , the caret ('^') is not a caret, it's "an arrow pointing upwards", and the ASCII arrow ("<-") is not an ASCII arrow composed of '<' and '-', but instead "a single-character arrow". A table at the end of the book (Appendix B) explains the correspondance, but that might not be immediately obvious. What are the benefits of having Haskell code samples (in a book specifically about learning Haskell) not being valid Haskell syntax? Why burden the beginner with the task of mentally translating these symbols? Patrick
Best, Ben
On 14 Jul 2011 10:48, "Roelof Wobben"
wrote: Hello
That was the problem.
When I do <- instead of <-- I see outcome.
So this problem is also solved.
Everyone thanks for the help and patience.
Roelof
________________________________
Date: Thu, 14 Jul 2011 09:25:33 +0100 Subject: Re: [Haskell-beginners] FW: question From: edwards.benj@gmail.com To: luca_ciciriello@hotmail.com CC: beginners@haskell.org; rwobben@hotmail.com
The first problem I see is that "x <--" is wrong... it should be just x <-, a single hyph...
mailto:luca_ciciriello@hotmail.com> wrote:
Hi. On wich system are you using GHCi ? Probably I missed this information from...
_______________________________________________ Beginners mailing list Beginners@haskell.org http://...
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- ===================== Patrick LeBoutillier Rosemère, Québec, Canada

----------------------------------------
Date: Thu, 14 Jul 2011 09:59:07 -0400 Subject: Re: [Haskell-beginners] FW: question From: patrick.leboutillier@gmail.com To: edwards.benj@gmail.com CC: rwobben@hotmail.com; beginners@haskell.org
On Thu, Jul 14, 2011 at 6:16 AM, Benjamin Edwards
wrote: Hi Roelof,
I don't want to come across as rude here, and I am sure the rest of the list will shoot me down if I do, but you had a number of people trying to diagnose a problem caused mostly by a failure on your part to type out correctly what you have read. You are going to find it very hard to make meaningful progress in your quest to learn Haskell if you don't take the time to at least learn the basic syntax of the language before coming to the mailing lists for help.
I agree, but here's something I'd like to point out:
IIRC, Roelof uses "Programming in Haskell" as his learning material. One thing that I found confusing in that book (and in other books as well), is that the authors insist on using LaTeX mathematical symbols in Haskell code instead of "valid Haskell syntax". For example, in the exact example from the book that Roelof is trying to understand:
[x^2 | x <- [1..5]]
, the caret ('^') is not a caret, it's "an arrow pointing upwards", and the ASCII arrow ("<-") is not an ASCII arrow composed of '<' and '-', but instead "a single-character arrow". A table at the end of the book (Appendix B) explains the correspondance, but that might not be immediately obvious.
What are the benefits of having Haskell code samples (in a book specifically about learning Haskell) not being valid Haskell syntax? Why burden the beginner with the task of mentally translating these symbols?
Patrick
Hello Patrick, You say it better then I could say it. The initial question was about the difference between what you call Latex and Haskell symbols. I must say that this book explains things better then the other books I tried. Roelof

On Jul 14, 2011, at 10:20 AM, Roelof Wobben wrote:
The initial question was about the difference between what you call Latex and Haskell symbols.
I must say that this book explains things better then the other books I tried.
On the web page for that book, there are a number of code sample files to download. Maybe you could look there for some good concrete examples of syntax. Note that they are in Literary Programming Style.
____________________ David Place Owner, Panpipes Ho! LLC http://panpipesho.com d@vidplace.com

Oke, Everyone thanks for the help. Roelof ----------------------------------------
Subject: Re: [Haskell-beginners] FW: question From: d@vidplace.com Date: Thu, 14 Jul 2011 10:40:17 -0400 CC: beginners@haskell.org To: rwobben@hotmail.com
On Jul 14, 2011, at 10:20 AM, Roelof Wobben wrote:
The initial question was about the difference between what you call Latex and Haskell symbols.
I must say that this book explains things better then the other books I tried.
On the web page for that book, there are a number of code sample files to download. Maybe you could look there for some good concrete examples of syntax. Note that they are in Literary Programming Style.
____________________ David Place Owner, Panpipes Ho! LLC http://panpipesho.com d@vidplace.com

On Thu, Jul 14, 2011 at 10:40:17AM -0400, David Place wrote:
On Jul 14, 2011, at 10:20 AM, Roelof Wobben wrote:
The initial question was about the difference between what you call Latex and Haskell symbols.
I must say that this book explains things better then the other books I tried.
On the web page for that book, there are a number of code sample files to download. Maybe you could look there for some good concrete examples of syntax. Note that they are in Literary Programming Style.
Usually that is called "literate" programming style. However, I like very much the idea of a literary programming style. Good programs should read like gripping novels. =) -Brent

On Mon, Jul 18, 2011 at 12:36:51PM -0400, Brent Yorgey wrote:
On Thu, Jul 14, 2011 at 10:40:17AM -0400, David Place wrote:
On Jul 14, 2011, at 10:20 AM, Roelof Wobben wrote:
The initial question was about the difference between what you call Latex and Haskell symbols.
I must say that this book explains things better then the other books I tried.
On the web page for that book, there are a number of code sample files to download. Maybe you could look there for some good concrete examples of syntax. Note that they are in Literary Programming Style.
Usually that is called "literate" programming style. However, I like very much the idea of a literary programming style. Good programs should read like gripping novels. =)
Like mystery novels, with twists and unexpected turns? That's often what programs do read like, but I would much prefer them to be like books for small children; concise, to the point, and exceedingly easy to read, even when one is tired. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay

On Mon, Jul 18, 2011 at 06:42:57PM +0200, Magnus Therning wrote:
On Mon, Jul 18, 2011 at 12:36:51PM -0400, Brent Yorgey wrote:
On Thu, Jul 14, 2011 at 10:40:17AM -0400, David Place wrote:
On Jul 14, 2011, at 10:20 AM, Roelof Wobben wrote:
The initial question was about the difference between what you call Latex and Haskell symbols.
I must say that this book explains things better then the other books I tried.
On the web page for that book, there are a number of code sample files to download. Maybe you could look there for some good concrete examples of syntax. Note that they are in Literary Programming Style.
Usually that is called "literate" programming style. However, I like very much the idea of a literary programming style. Good programs should read like gripping novels. =)
Like mystery novels, with twists and unexpected turns?
That's often what programs do read like, but I would much prefer them to be like books for small children; concise, to the point, and exceedingly easy to read, even when one is tired.
It depends on the type of program. If you have a complicated story to tell, you have a complicated story to tell. But good mystery novels take a complicated story and tell it in a way that helps the reader follow all the threads, appreciate the surprising twists, and come away feeling satisfied. Most programs do not read like that. -Brent

In Appendix B (page 166) there is a "symbol table" translating the typeset symbols into valid Haskell syntax. HTH, Thomas On 14.07.2011 15:59, Patrick LeBoutillier wrote:
IIRC, Roelof uses "Programming in Haskell" as his learning material. One thing that I found confusing in that book (and in other books as well), is that the authors insist on using LaTeX mathematical symbols in Haskell code instead of "valid Haskell syntax". For example, in the exact example from the book that Roelof is trying to understand:
[x^2 | x<- [1..5]]
, the caret ('^') is not a caret, it's "an arrow pointing upwards", and the ASCII arrow ("<-") is not an ASCII arrow composed of '<' and '-', but instead "a single-character arrow". A table at the end of the book (Appendix B) explains the correspondance, but that might not be immediately obvious.
participants (8)
-
Benjamin Edwards
-
Brent Yorgey
-
David Place
-
Luca Ciciriello
-
Magnus Therning
-
Patrick LeBoutillier
-
Roelof Wobben
-
Thomas