Simplify getStringFromParsec
This commit is contained in:
parent
6c81505870
commit
3f40b688ee
|
@ -3456,9 +3456,8 @@ makeErrorFor parsecError =
|
||||||
pos = errorPos parsecError
|
pos = errorPos parsecError
|
||||||
|
|
||||||
getStringFromParsec errors =
|
getStringFromParsec errors =
|
||||||
case map f errors of
|
headOrDefault "" (mapMaybe f $ reverse errors) ++
|
||||||
r -> unwords (take 1 $ catMaybes $ reverse r) ++
|
" Fix any mentioned problems and try again."
|
||||||
" Fix any mentioned problems and try again."
|
|
||||||
where
|
where
|
||||||
f err =
|
f err =
|
||||||
case err of
|
case err of
|
||||||
|
|
Loading…
Reference in New Issue