RE: [Haskell-cafe] First steps in Haskell

2005-12-20 Thread Simon Peyton-Jones
| (mild) culture shock here. It is typical for people in the Haskell | community to view things in a rather principled way. A language | tutorial is supposed to introduce /the language/. If you want to know | how to compile or execute a Haskell program, well then, look at the | appropriate

Re: [Haskell-cafe] First steps in Haskell

2005-12-20 Thread Daniel Carrera
Simon Peyton-Jones wrote: I'm certain there are hurdles, but I think on the whole they are there by accident rather than design. Why certainly. I have never seen any on-line community that had hurdles by design. Hurdles are usually due to the fact that the people who design the

Re: [Haskell-cafe] First steps in Haskell

2005-12-20 Thread Chris Kuklewicz
Daniel Carrera wrote: Hello all, I'm trying to write the simplest possible Haskell program, and I'm not getting anywhere. I have installed Hugs, GHC and GHCI. I want to run the following program: fac :: Integer - Integer fac 0 = 1 fac n | n 0 = n * fac (n-1) $ ghci Prelude let {

Re: [Haskell-cafe] First steps in Haskell

2005-12-20 Thread Tomasz Zielonka
On Mon, Dec 19, 2005 at 01:17:35PM -, Simon Peyton-Jones wrote: | Actually, I have sometimes wished that the various interactive Haskell | interfaces had the possibility to enter also declarations interactively GHCi does. ghci let f x = hello ghci f True True But there's no

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Wolfgang Jeltsch
Am Sonntag, 18. Dezember 2005 17:25 schrieb Daniel Carrera: [...] This is a real problem for Haskell. I expect that a lot of people try Haskell and give up because they can't even write the simplest function. Hello Daniel, honestly, I have to say that during my years with Haskell, this seems

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Wolfgang Jeltsch
Am Sonntag, 18. Dezember 2005 17:42 schrieb Daniel Carrera: Lemmih wrote: GHC is a compiler. If you want to compile to a binary then you must define a function called 'main'. Otherwise just load the file in ghci (`ghci fac.hs`). I would expect GHC to be able to compile a program with a

RE: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Simon Peyton-Jones
Of | Wolfgang Jeltsch | Sent: 19 December 2005 09:50 | To: haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] First steps in Haskell | | Am Sonntag, 18. Dezember 2005 17:25 schrieb Daniel Carrera: | [...] | | This is a real problem for Haskell. I expect that a lot of people try | Haskell and give

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Wolfgang Jeltsch
Am Sonntag, 18. Dezember 2005 18:04 schrieb Daniel Carrera: Joel Koerwer wrote: Then after you've played with you creation a bit, check out http://haskell.org/learning.html http://haskell.org/learning.html Thank you. I did find that page, and it was very easy to find. There's a link on the

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Daniel Carrera
Wolfgang Jeltsch wrote: In addition, Haskells requirement of a main variable is nothing new. Certainly nothing new. I just wish that the documentation I read had told me about it. `ghci fac.hs` doesn't give any errors. I don't understand why loading the file like that is ok but typing the

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Daniel Carrera
Wolfgang Jeltsch wrote: The problem is that the content of that page, and its links, didn't show me how to write a Haskell program (like you did). If you want to know how to feed, for example, Hugs with your Haskell program, you might have to have a look at some Hugs documentation. Remember

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Wolfgang Jeltsch
Am Sonntag, 18. Dezember 2005 18:02 schrieb Daniel Carrera: Chris Kuklewicz wrote: Almost everything is explained under http://www.haskell.org/ghc/docs/6.4.1/html/users_guide/ghci.html Ok. How would a visitor to the Haskell site find this document? The point is that the visitor should

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Tomasz Zielonka
On Mon, Dec 19, 2005 at 10:14:07AM +, Daniel Carrera wrote: Wolfgang Jeltsch wrote: If you want to know how to feed, for example, Hugs with your Haskell program, you might have to have a look at some Hugs documentation. Remember that different Haskell implementations like Hugs, GHCi

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Daniel Carrera
Wolfgang Jeltsch wrote: The point is that the visitor should know that he/she might need a document about GHCi if he/she wants to use GHCi. A introductionary document about Haskell might not explain a specific Haskell system. If you read a book which is about C++ in general, it won't tell

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Daniel Carrera
Tomasz Zielonka wrote: I think what Wolfgang meant was that different Haskell implementations may have: - different executable names, so you have to invoke them differently - different options - different style of work etc... Of course, all of them should accept all Haskell 98 programs. Ah.

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Bjorn Lisper
Simon P-J: Daniel is right, by definition. He is a new user. He had difficulty. That much is incontrovertible. While he may seem unusual, perhaps he is only unusual in that he's told us about his experience rather than trying Perl instead. For which, much thanks, Daniel! Actually, I have

RE: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Simon Peyton-Jones
- | From: Bjorn Lisper [mailto:[EMAIL PROTECTED] | Sent: 19 December 2005 13:06 | To: Simon Peyton-Jones | Cc: [EMAIL PROTECTED]; haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] First steps in Haskell | | Simon P-J: | Daniel is right, by definition. He is a new user. He had difficulty

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Wolfgang Jeltsch
Am Montag, 19. Dezember 2005 12:13 schrieb Daniel Carrera: [...] I guess that Haskell is unique among interpreted languages Haskell is not an interpreted language. There are Haskell interpreters, there are Haskell compilers. in that there are two compilers and they work different. The

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Bjorn Lisper
Simon: Me: | Actually, I have sometimes wished that the various interactive Haskell | interfaces had the possibility to enter also declarations interactively GHCi does. Ah, I see! Does it open a let-environment with a local definition? ghci let f x = hello ghci f True True Hmm, an interesting

Re: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Benjamin Franksen
On Monday 19 December 2005 12:13, Daniel Carrera wrote: Wolfgang Jeltsch wrote: * There's no way for a new user to figure out how to successfully run the simplest Haskell program. There is! The Hugs 98 User's Guide and The GHC User's Guide. Okay, I stand corrected. I rephrase the

[Haskell-cafe] First steps in Haskell

2005-12-18 Thread Daniel Carrera
Hello all, I'm trying to write the simplest possible Haskell program, and I'm not getting anywhere. I have installed Hugs, GHC and GHCI. I want to run the following program: fac :: Integer - Integer fac 0 = 1 fac n | n 0 = n * fac (n-1) This is what I see: $ hugs Hugs.Base fac :: Integer

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Lemmih
On 12/18/05, Daniel Carrera [EMAIL PROTECTED] wrote: Hello all, I'm trying to write the simplest possible Haskell program, and I'm not getting anywhere. I have installed Hugs, GHC and GHCI. I want to run the following program: fac :: Integer - Integer fac 0 = 1 fac n | n 0 = n * fac

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Joel Koerwer
Try ghci fac.hs. You will then have an interactive session with access to the definitions in your file.Then after you've played with you creation a bit, check out http://haskell.org/learning.html Welcome and enjoy!Joel ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Chris Kuklewicz
Daniel Carrera wrote: Hello all, I'm trying to write the simplest possible Haskell program, and I'm not getting anywhere. I have installed Hugs, GHC and GHCI. I want to run the following program: fac :: Integer - Integer fac 0 = 1 fac n | n 0 = n * fac (n-1) $ ghci Prelude let {

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Daniel Carrera
Lemmih wrote: GHC is a compiler. If you want to compile to a binary then you must define a function called 'main'. Otherwise just load the file in ghci (`ghci fac.hs`). I would expect GHC to be able to compile a program with a function that is not called 'main'. I wouldn't expect it to print

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Daniel Carrera
Chris Kuklewicz wrote: Almost everything is explained under http://www.haskell.org/ghc/docs/6.4.1/html/users_guide/ghci.html Ok. How would a visitor to the Haskell site find this document? If this is the correct document for a beginner to start with Haskell, perhaps the site should be

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Daniel Carrera
Joel Koerwer wrote: Then after you've played with you creation a bit, check out http://haskell.org/learning.html http://haskell.org/learning.html Thank you. I did find that page, and it was very easy to find. The problem is that the content of that page, and its links, didn't show me how to

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Sebastian Sylvan
On 12/18/05, Daniel Carrera [EMAIL PROTECTED] wrote: Lemmih wrote: GHC is a compiler. If you want to compile to a binary then you must define a function called 'main'. Otherwise just load the file in ghci (`ghci fac.hs`). I would expect GHC to be able to compile a program with a function

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Cale Gibbard
On 18/12/05, Daniel Carrera [EMAIL PROTECTED] wrote: Chris Kuklewicz wrote: Almost everything is explained under http://www.haskell.org/ghc/docs/6.4.1/html/users_guide/ghci.html Ok. How would a visitor to the Haskell site find this document? If this is the correct document for a beginner