I want to write a function, something like this
double :: Int -> Int
double x = x + x
The problem is that after I write the first line:
Prelude> double :: Int -> Int
I try to go to the next line pressing the enter key, but when I do I get:
<interactive>:84:1: Not in scope: `double'
Prelude>
It seems that the program executes the first line, but I dont want that, I want the program to let me write the second line and only then compile and execute
So, how can I go to the next line in Haskell (Im using the Terminal on Mac OS)?