Simple function gives UTF-8 decoding error.

Haskell version installed on my computer with OS Windows 7, 64 bit. GHCi, version 7.8.3 My haskell script is in a file named baby.hs with following functions, doubleMe x = x + x doubleUs x y = x*2 + y*2 removeNonUpperCase :: [Char] -> [Char] removeNonUpperCase st = [c | c <- st, c `élem` ['A'..'Z']] I get following error:- g>:l baby [1 of 1] Compiling Main ( baby.hs, interpreted ) baby.hs:6:42: lexical error (UTF-8 decoding error) Failed, modules loaded: none. I am not able to advance any further, please suggest. -- thanks Vilpesh

Yes, é in élem was the problem, thanks for pointing that out.
Vilpesh
On Sun, May 8, 2016 at 9:04 PM, Imants Cekusins
é in élem?
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- thanks Vilpesh
participants (2)
-
Imants Cekusins
-
Vilpesh Mistry