Use maybe instead of fromMaybe and fmap

This commit is contained in:
Joseph C. Sible 2020-02-01 22:50:17 -05:00
parent f5c6771016
commit 28978a8b65
3 changed files with 9 additions and 9 deletions

View file

@ -88,9 +88,9 @@ checkScript sys spec = do
asOptionalChecks = csOptionalChecks spec
} where as = newAnalysisSpec root
let analysisMessages =
fromMaybe [] $
maybe []
(arComments . analyzeScript . analysisSpec)
<$> prRoot result
$ prRoot result
let translator = tokenToPosition tokenPositions
return . nub . sortMessages . filter shouldInclude $
(parseMessages ++ map translator analysisMessages)