File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,17 @@ import System.FilePath.Posix
19
19
nestedCabalFiles :: FilePath -> IO [FilePath ]
20
20
nestedCabalFiles f = do
21
21
fs <- listDirectory f
22
- case filter (( " .cabal " == ) . takeExtension) fs of
23
- h : _ -> pure [f </> h]
24
- _ ->
25
- fmap concat . mapM nestedCabalFiles
26
- =<< filterM
27
- ( fmap (fileTypeIsDirectory . fileTypeFromMetadata) . getFileMetadata)
28
- ( map (f </> ) $
29
- filter
30
- ( `notElem` [ " .git " , " dist " , " dist-newstyle " , " .stack-work " ] )
31
- fs
32
- )
22
+ nf <-
23
+ fmap concat . mapM nestedCabalFiles
24
+ =<< filterM
25
+ ( fmap (fileTypeIsDirectory . fileTypeFromMetadata) . getFileMetadata)
26
+ ( map (f </> ) $
27
+ filter
28
+ ( `notElem` [ " .git " , " dist " , " dist-newstyle " , " .stack-work " ])
29
+ fs
30
+ )
31
+ let cf = filter (( " .cabal " == ) . takeExtension) fs
32
+ pure $ map (f </> ) cf <> nf
33
33
34
34
nestedPkg :: FilePath -> FilePath -> IO (Maybe Package )
35
35
nestedPkg parrent child = do
You can’t perform that action at this time.
0 commit comments