I'm learning haskell and I'm trying to write some simple functions. Everything worked well until I've used function isUpper
. I'm unable to compile the project because of this error:
[1 of 1] Compiling Main ( C:\Users\...\src\Main.hs, interpreted )
C:\Users\...\src\Main.hs:147:25:
Not in scope: `isUpper'
Failed, modules loaded: none.
Prelude>
My code:
module Main where
main::IO()
main = undefined
stringIsUpper [] = True
stringIsUpper (x:ys) = (isUpper x) && (stringIsUpper(ys))
The goal of this code should be just to check if the inserted string consists of the uppercase letters. I'm using EclipseFP for development Thank you for your help
You need to import
Data.Char
to get isUpper
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With