File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ findCandidate dirs name = do
458458-- directories.
459459logPossibilities :: HasTerm env => [Path Abs Dir ] -> ModuleName -> RIO env ()
460460logPossibilities dirs mn = do
461- possibilities <- fmap concat (makePossibilities mn)
461+ possibilities <- concat <$> makePossibilities
462462 unless (null possibilities) $ prettyWarn $
463463 fillSep
464464 [ flow " Unable to find a known candidate for the Cabal entry"
@@ -477,20 +477,13 @@ logPossibilities dirs mn = do
477477 , " (" <> style File " stack.yaml" <> " )."
478478 ]
479479 where
480- makePossibilities name =
481- mapM
482- ( \ dir -> do
483- (_,files) <- listDir dir
484- pure
485- ( map
486- filename
487- ( filter
488- (isPrefixOf (display name) . toFilePath . filename)
489- files
490- )
491- )
492- )
493- dirs
480+ makePossibilities = mapM makePossibility dirs
481+
482+ makePossibility dir = do
483+ (_, files) <- listDir dir
484+ pure $ map
485+ filename
486+ (filter (isPrefixOf (display mn) . toFilePath . filename) files)
494487
495488type CAndJsSources rec =
496489 (HasField " cSources" rec [FilePath ], HasField " jsSources" rec [FilePath ])
You can’t perform that action at this time.
0 commit comments