@@ -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.
336324simpleCabalCradle :: FilePath -> (Config. CradleTree a , FilePath )
337- #if MIN_VERSION_hie_bios(0,20,0)
338325simpleCabalCradle fp = (Config. Cabal $ Config. CabalType Nothing Nothing Nothing , fp)
339- #else
340- simpleCabalCradle fp = (Config. Cabal $ Config. CabalType Nothing Nothing , fp)
341- #endif
342326
343327cabalExecutable :: MaybeT IO FilePath
344328cabalExecutable = MaybeT $ findExecutable " cabal"
0 commit comments