Skip to content

Commit f7bfc24

Browse files
authored
Merge pull request #1 from jneira/last-hie-bios
Adapt to lastest hie-bios breaking api changes
2 parents 508a96b + b2f3604 commit f7bfc24

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

implicit-hie-cradle.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ library
4040
, directory >=1.3.0 && <1.4
4141
, extra >=1.6.14 && <1.8
4242
, filepath >=1.4.1 && <1.5
43-
, hie-bios >=0.5.1
43+
, hie-bios >=0.7.0
4444
, hslogger >=1.2 && <1.4
4545
, implicit-hie
4646
, process >=1.6.1 && <1.7

src/Hie/Implicit/Cradle.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import qualified Data.Text as T
2323
import Data.Void
2424
import qualified Data.Yaml as Yaml
2525
import GHC.Fingerprint (fingerprintString)
26-
import HIE.Bios.Config
26+
import HIE.Bios.Config hiding (cabalComponent, stackComponent)
2727
import HIE.Bios.Cradle
2828
import HIE.Bios.Environment (getCacheDir)
2929
import HIE.Bios.Types hiding (ActionName (..))
@@ -60,7 +60,7 @@ implicitConfig fp = do
6060
implicitConfig' :: FilePath -> MaybeT IO (CradleType a, FilePath)
6161
implicitConfig' fp =
6262
( \wdir ->
63-
(Bios (wdir </> ".hie-bios") Nothing, wdir)
63+
(Bios (Program $ wdir </> ".hie-bios") Nothing Nothing, wdir)
6464
)
6565
<$> biosWorkDir fp
6666
-- <|> (Obelisk,) <$> obeliskWorkDir fp
@@ -79,10 +79,13 @@ implicitConfig' fp =
7979
c <- cn <$> readPkgs cc gp p
8080
pure (c, p)
8181
cabal :: FilePath -> MaybeT IO (CradleType a, FilePath)
82-
cabal = build CabalMulti cabalComponent cabalPkgs
83-
stack = build StackMulti stackComponent stackYamlPkgs
82+
cabal = build (CabalMulti mempty) cabalComponent' cabalPkgs
83+
stack :: FilePath -> MaybeT IO (CradleType a, FilePath)
84+
stack = build (StackMulti mempty) stackComponent' stackYamlPkgs
8485
components f (Package n cs) = map (f n) cs
8586

87+
cabalComponent' n c = CabalType . Just <$> cabalComponent n c
88+
stackComponent' n c = flip StackType Nothing . Just <$> stackComponent n c
8689
------------------------------------------------------------------------
8790
-- Cabal Cradle
8891
-- Works for new-build by invoking `v2-repl` does not support components

0 commit comments

Comments
 (0)