Skip to content

Commit 1ffe834

Browse files
committed
depend on hie-bios ^>=0.20
1 parent dc399dd commit 1ffe834

3 files changed

Lines changed: 3 additions & 20 deletions

File tree

cabal.project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ if !os(windows)
2020
if impl(ghc >10.0)
2121
constraints:
2222
hashable==1.4.7.0
23-
, hie-bios>=0.20
2423

2524
allow-newer:
2625
ghc-boot-th,

haskell-debugger.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ library dap-server
185185
unordered-containers >= 0.2.19 && < 0.3,
186186

187187
haskell-debugger,
188-
hie-bios,
188+
hie-bios ^>= 0.20,
189189
prettyprinter ^>= 1.7.0,
190190
co-log-core >= 0.3.2.5 && < 0.4,
191191
implicit-hie ^>=0.1.4.0,

hdb-dap/Development/Debug/Session/Setup.hs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,7 @@ hieBiosFlags cradle root relTarget = runExceptT $ do
186186
-- because hie.yaml may invoke programs relative to the root (e.g. GHC's hie.yaml does)
187187
-- (HIE.getCompilerOptions depends on CWD being the proper root dir)
188188
let compilerOpts = liftIO $ withCurrentDirectory root $
189-
#if MIN_VERSION_hie_bios(0,20,0)
190189
HIE.getCompilerOptions (HIE.TargetWithContext target [target]) HIE.LoadUnitsFromCradle cradle
191-
#elif MIN_VERSION_hie_bios(0,14,0)
192-
HIE.getCompilerOptions target (HIE.LoadWithContext [target]) cradle
193-
#else
194-
HIE.getCompilerOptions target [] cradle
195-
#endif
196190
componentOpts <- compilerOpts >>= unwrapCradleResult "Failed to get compiler options using hie-bios cradle"
197191
#if __GLASGOW_HASKELL__ >= 913
198192
-- fwrite-if-simplified-core requires a recent bug fix regarding GHCi loading
@@ -311,18 +305,12 @@ stackCradle fp = do
311305
pkgsWithComps <- liftIO $ catMaybes <$> mapM (Implicit.nestedPkg fp) pkgs
312306
let yaml = fp </> "stack.yaml"
313307
pure $ (,fp) $ case pkgsWithComps of
314-
[] -> Config.Stack (mkStackType Nothing (Just yaml))
308+
[] -> Config.Stack (Config.StackType Nothing (Just yaml) Nothing)
315309
ps -> Config.StackMulti mempty $ do
316310
Implicit.Package n cs <- ps
317311
c <- cs
318312
let (prefix, comp) = Implicit.stackComponent n c
319-
pure (prefix, mkStackType (Just comp) (Just yaml))
320-
where
321-
#if MIN_VERSION_hie_bios(0,20,0)
322-
mkStackType a b = Config.StackType a b Nothing
323-
#else
324-
mkStackType a b = Config.StackType a b
325-
#endif
313+
pure (prefix, Config.StackType (Just comp) (Just yaml) Nothing)
326314

327315
-- | By default, we generate a simple cabal cradle which is equivalent to the
328316
-- following hie.yaml:
@@ -334,11 +322,7 @@ stackCradle fp = do
334322
--
335323
-- Note, this only works reliable for reasonably modern cabal versions >= 3.2.
336324
simpleCabalCradle :: FilePath -> (Config.CradleTree a, FilePath)
337-
#if MIN_VERSION_hie_bios(0,20,0)
338325
simpleCabalCradle fp = (Config.Cabal $ Config.CabalType Nothing Nothing Nothing, fp)
339-
#else
340-
simpleCabalCradle fp = (Config.Cabal $ Config.CabalType Nothing Nothing, fp)
341-
#endif
342326

343327
cabalExecutable :: MaybeT IO FilePath
344328
cabalExecutable = MaybeT $ findExecutable "cabal"

0 commit comments

Comments
 (0)