내 디버거의 dropWhile 중간을 가리키는, haskell에서 이상한 오류가 발생했습니다. 예 : '' '구문 분석 오류' 모듈을로드하지 못했습니다.Haskell 컴파일 오류
코드 :
identifyFilter :: String -> (Filter, String)
identifyFilter ('"':xs) | not null rest = (filter, rest1)
| otherwise = error "Invalid input"
where (field, rest) = break (=='"') xs
(cond, rest1) = break (=='"') (tail (dropWhile (/= '"') (tail rest)))
filter = (FieldName field , identifyParsers cond)
identifyFilter ('@':xs) | not null rest = (filter, rest1)
| otherwise = error "Invalid input"
where (index, rest)(reads xs) :: [(Int,String)]
(cond, rest1) = break (=='"') (tail (dropWhile (/= '"') (tail rest)))
filter = (FieldIndex index , identifyParsers cond)
identifyFilter (x:xs) = error "Invalid input"
이 나는 단어의 중간에 가리키는 경우에 특히 오류의 원인이 될 수있는 무슨 가능한 단서가 없다. 필요한 경우 자세히 질문하십시오. 모든 제안,
GHCi는 나를 위해 그 행을 허용합니다 (''어디로' '대신에''대체 됨). 문제는 다른 곳에서 발생할 가능성이 큽니다. – ibid
컴파일 할 때 정확한 오류를 생성하는 짧지 만 완전한 코드 샘플이 좋습니다. – sepp2k
이전/다음 줄 중 어느 것이'dropWhile'의 중간/위/아래에 있습니까? 그렇다면 무엇입니까? – dave4420