I am having problem in entering multi-line commands in ghci.
The following 2-line code works from a file:
addTwo :: Int -> Int -> Int
addTwo x y = x + y
But when I enter in ghci, I get an error:
<interactive>:1:1: error:
Variable not in scope: addTwo :: Int -> Int -> Int
I also tried putting the code inside :{ ... :}
, but they are also not working for this example, because this is just appending the lines into one line, which should not be the case.
I am using WinGHCi, version 2011.2.0.1
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…