
8 Mar
2011
8 Mar
'11
10:15 a.m.
On Tue, Mar 08, 2011 at 12:40:23PM +0800, Simon Sin wrote:
Hi! I'm new to Haskell. Following someone's notes, I was doing this "doubleMe x = x + x". I did this two days ago and it worked. But I try to do it today, I got an error "parse error on input '=' ",
If you put doubleMe x = x + x by itself in a .hs file and load it into ghci, it should work just fine. On the other hand, you cannot simply type it at the ghci prompt; you will get a parse error like the one you mentioned. ghci only allows you to enter expressions, not declarations. -Brent