总 Haskell 菜鸟在这里。我有一个简单的功能,和一个主要的。我不知道这个错误是什么意思:
Couldn't match expected type `IO t0' with actual type `Bool'
In the expression: main
When checking the type of the function `main'
编译代码时:
is_instructor :: String -> Bool
is_instructor "Jeremy Erickson" = True
is_instructor x = False
main :: Bool
main = is_instructor "foo"