mirror of
https://github.com/Avi-D-coder/implicit-hie.git
synced 2024-11-22 17:55:51 +03:00
Make ordering consistent with hie-bios + Fix stack
This commit is contained in:
parent
b794a576b7
commit
58d729310b
@ -23,6 +23,7 @@ main = do
|
|||||||
let name =
|
let name =
|
||||||
if | any (("dist-newstyle" ==) . takeFileName) files -> "cabal"
|
if | any (("dist-newstyle" ==) . takeFileName) files -> "cabal"
|
||||||
| any ((".stack-work" ==) . takeFileName) files -> "stack"
|
| any ((".stack-work" ==) . takeFileName) files -> "stack"
|
||||||
|
| any (("cabal.project" ==) . takeFileName) files -> "cabal"
|
||||||
| any (("stack.yaml" ==) . takeFileName) files -> "stack"
|
| any (("stack.yaml" ==) . takeFileName) files -> "stack"
|
||||||
| otherwise -> "cabal"
|
| otherwise -> "cabal"
|
||||||
cfs <- runMaybeT $ case name of
|
cfs <- runMaybeT $ case name of
|
||||||
|
@ -37,7 +37,10 @@ instance FromJSON Pkgs where
|
|||||||
stackYamlPkgs :: FilePath -> MaybeT IO [FilePath]
|
stackYamlPkgs :: FilePath -> MaybeT IO [FilePath]
|
||||||
stackYamlPkgs p = liftIO $
|
stackYamlPkgs p = liftIO $
|
||||||
decodeFileEither (p </> "stack.yaml") >>= \case
|
decodeFileEither (p </> "stack.yaml") >>= \case
|
||||||
Right (Pkgs f) -> pure f
|
Right (Pkgs f) ->
|
||||||
|
liftIO $
|
||||||
|
map (p </>)
|
||||||
|
<$> getDirectoryFiles p (map (</> "*.cabal") f)
|
||||||
Left e -> fail $ show e
|
Left e -> fail $ show e
|
||||||
|
|
||||||
cabalPkgs :: FilePath -> MaybeT IO [FilePath]
|
cabalPkgs :: FilePath -> MaybeT IO [FilePath]
|
||||||
|
Loading…
Reference in New Issue
Block a user