@@ -348,7 +348,7 @@ completeFunc reversedPrev word
348348 -- Commands
349349 | reversedPrev == " :"
350350 = pure . listCompletion
351- $ map helpOptionName (helpOptions :: HelpOptions e t f m )
351+ $ fmap helpOptionName (helpOptions :: HelpOptions e t f m )
352352
353353 -- Files
354354 | any (`Data.List.isPrefixOf` word) [ " /" , " ./" , " ../" , " ~/" ]
@@ -363,9 +363,7 @@ completeFunc reversedPrev word
363363 Nothing -> pure []
364364 Just binding -> do
365365 candidates <- lift $ algebraicComplete subFields binding
366- pure
367- $ map notFinished
368- $ listCompletion (Data.Text. unpack . (var <> ) <$> candidates)
366+ pure $ notFinished <$> listCompletion (Data.Text. unpack . (var <> ) <$> candidates)
369367
370368 -- Builtins, context variables
371369 | otherwise
@@ -377,11 +375,11 @@ completeFunc reversedPrev word
377375
378376 pure $ listCompletion
379377 $ [" __includes" ]
380- ++ (Data.Text. unpack <$> contextKeys)
381- ++ (Data.Text. unpack <$> shortBuiltins)
378+ <> (Data.Text. unpack <$> contextKeys)
379+ <> (Data.Text. unpack <$> shortBuiltins)
382380
383381 where
384- listCompletion = map simpleCompletion . filter (word `Data.List.isPrefixOf` )
382+ listCompletion = fmap simpleCompletion . filter (word `Data.List.isPrefixOf` )
385383
386384 notFinished x = x { isFinished = False }
387385
@@ -401,7 +399,7 @@ completeFunc reversedPrev word
401399 Nothing -> pure []
402400 Just e ->
403401 demand e
404- (\ e' -> fmap ((" ." <> f) <> ) <$> algebraicComplete fs e')
402+ (\ e' -> ( fmap . fmap ) ((" ." <> f) <> ) $ algebraicComplete fs e')
405403
406404 in case val of
407405 NVSet xs _ -> withMap xs
@@ -508,7 +506,7 @@ renderSetOptions :: [HelpSetOption] -> Doc ()
508506renderSetOptions so =
509507 Prettyprinter. indent 4
510508 $ Prettyprinter. vsep
511- $ flip map so
509+ $ flip fmap so
512510 $ \ h ->
513511 Prettyprinter. pretty (helpSetOptionName h)
514512 <+> helpSetOptionSyntax h
0 commit comments