Declarations at the GHCi prompt

I have just installed Haskell Platform for Windows (version 2011.2.0.1), and started to work through the HaskellQuestions.pdf

The second question requires "x = 3" as the answer. But when I enter this into GHCi I get

GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> x = 3

<interactive>:1:3: parse error on input `='
Prelude>

Why? I checked the answer, and I am right. Whats the matter with the equals sign?

9
задан Don Stewart 25 May 2011 в 20:54
поделиться