我正在学习haskell,我正在尝试编写一些简单的函数.一切顺利,直到我使用功能isUpper.由于此错误,我无法编译项目:
[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>
Run Code Online (Sandbox Code Playgroud)
我的代码:
module Main where
main::IO()
main = undefined
stringIsUpper [] = True
stringIsUpper (x:ys) = (isUpper x) && (stringIsUpper(ys))
Run Code Online (Sandbox Code Playgroud)
此代码的目标应该只是检查插入的字符串是否由大写字母组成.我正在使用EclipseFP进行开发感谢您的帮助