I have the following code:
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
I get an error in the line with the comment above, error:
aaa.hs:56:2: parse error (possibly incorrect indentation)
I work with emacs, there are no spaces, and I do not understand what I was doing wrong.
indentation functional-programming haskell
Drakosha
source share