GHCi error: Not in scope

Posted by dmindreader on Stack Overflow See other posts from Stack Overflow or by dmindreader
Published on 2010-04-04T21:08:03Z Indexed on 2010/04/04 21:13 UTC
Read the original article Hit count: 597

Filed under:
|

I'm trying to compile this function from Learn You a Haskell for Great Good.

 removeNonUppercase st = [ c | c <- st, c `elem` ['A'..'Z']]   

by placing it into a removeNonUpperCase.hs file.

It compiles fine, but when passing the argument:

ghci> removeNonUppercase "Hahaha! Ahahaha!"  

the compiler says:

<interactive>:1:0: Not in scope: 'removeNonUpperCase'

Why?

PrintScreen:

© Stack Overflow or respective owner

Related posts about haskell

Related posts about ghci