Simplify getStringFromParsec

This commit is contained in:
Joseph C. Sible 2023-12-31 16:33:34 -05:00
parent 6c81505870
commit 3f40b688ee
1 changed files with 2 additions and 3 deletions
src/ShellCheck

View File

@ -3456,8 +3456,7 @@ makeErrorFor parsecError =
pos = errorPos parsecError
getStringFromParsec errors =
case map f errors of
r -> unwords (take 1 $ catMaybes $ reverse r) ++
headOrDefault "" (mapMaybe f $ reverse errors) ++
" Fix any mentioned problems and try again."
where
f err =