Ho il seguente codice:strano errore di Haskell circa rientro del 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
ottengo un errore sulla linea con il commento di cui sopra, l'errore è:
aaa.hs:56:2:
parse error (possibly incorrect indentation)
Sto lavorando con emacs, non ci sono spazi e non capisco cosa ho fatto di sbagliato.
Ha risolto il problema, 10 volte! – Drakosha