压痕哈斯克尔奇怪的错误,我有以下代码:约的IF-THEN-ELSE
foo :: Int -> [String] -> [(FilePath, Integer)] -> IO Int
foo _ [] _ = return 4
foo _ _ [] = return 5
foo n nameREs pretendentFilesWithSizes = do
result <- (bar n (head nameREs) pretendentFilesWithSizes)
if result == 0
then return 0 -- <========================================== here is the error
else foo n (tail nameREs) pretendentFilesWithSizes
我得到上面的注释的行的错误,错误的是:
aaa.hs:56:2:
parse error (possibly incorrect indentation)
我正在使用emacs,没有空格,我不明白我做错了什么。
它解决了这个问题,10倍! – Drakosha 2010-05-31 19:37:01