If I enter any function type definition in WinGHCi, such as the following from learnyouahaskell.com
factorial :: Integer -> Integer
I always get
<interactive>:8:1: error:
Variable not in scope: factorial :: Integer -> Integer
Surely I am doing something wrong with the environment, but I don't know how to fix it.