这里是模块 - Number1.hs不在范围:数据构造IsTriangle
module Number1(isTriangle) where
isTriangle x y z = if x*x+y*y >= z*z then True
else False
这是主程序Main1.hs
import System.Environment
import Number1
main = do
args<-getArgs
let a = args !! 0
let b = args !! 1
let c = args !! 2
if (IsTriangle a b c) then return(True)
else return(False)
这个错误,我得到的时候ghc --make Main1.hs
附: '如果出现错误,则返回True'否则False'与'something'相同 – user102008