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 =
|
||||
if | any (("dist-newstyle" ==) . takeFileName) files -> "cabal"
|
||||
| any ((".stack-work" ==) . takeFileName) files -> "stack"
|
||||
| any (("cabal.project" ==) . takeFileName) files -> "cabal"
|
||||
| any (("stack.yaml" ==) . takeFileName) files -> "stack"
|
||||
| otherwise -> "cabal"
|
||||
cfs <- runMaybeT $ case name of
|
||||
|
@ -37,7 +37,10 @@ instance FromJSON Pkgs where
|
||||
stackYamlPkgs :: FilePath -> MaybeT IO [FilePath]
|
||||
stackYamlPkgs p = liftIO $
|
||||
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
|
||||
|
||||
cabalPkgs :: FilePath -> MaybeT IO [FilePath]
|
||||
|
Loading…
Reference in New Issue
Block a user