Beginning Haskell: "not in scope" Unprecedented error
- by user1071838
So I just started learning Haskell, and this (http://learnyouahaskell.com) nifty book is giving a lot of help. So yesterday I wrote in a text file
doubleMe x = x + x
and saved it as double.hs. So after saving that I open up my command prompt, CD to the right folder, type in "ghci" to get haskell started, and then type in
>doubleMe 5
10
and everything seems to work. Now today, I do the same thing and this happens (actual copy paste from command line) . . .
C:\Users\myName\haskell>ghci
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> :l double.hs
[1 of 1] Compiling Main ( double.hs, interpreted )
Ok, modules loaded: Main.
*Main> doubleMe 5
<interactive>:1:1: Not in scope: `doubleMe'
So basically, everything was working fine, but now haskell can't find the function I wrote in double.hs. Can anyone tell what is going on? I'm pretty lost and confused. This is just a guess but does it have to do with *Main at all? Thanks for the help.