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 by pressing the enter key, but when I do this, I get:
<interactive>:84:1: Not in scope: `double' Prelude>
It seems that the program executes the first line, but I do not want this, I want the program to allow me to write the second line and only then compile and execute
So, how can I go to the next line in Haskell (I use a terminal on Mac OS)?
source share