hie-bios 0.13.0 → 0.13.1
raw patch · 10 files changed
+106/−143 lines, 10 filesdep ~basedep ~ghcdep ~textPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, ghc, text
API changes (from Hackage documentation)
- HIE.Bios.Ghc.Gap: emptyWarnFlags :: WarnFlags
- HIE.Bios.Ghc.Gap: getModuleName :: (a, b) -> a
- HIE.Bios.Ghc.Gap: inTypes :: MatchGroup GhcTc LExpression -> [Type]
- HIE.Bios.Ghc.Gap: outType :: MatchGroup GhcTc LExpression -> Type
- HIE.Bios.Ghc.Gap: type LBinding = LHsBind GhcTc
- HIE.Bios.Ghc.Gap: type LExpression = LHsExpr GhcTc
- HIE.Bios.Ghc.Gap: type LPattern = LPat GhcTc
- HIE.Bios.Ghc.Gap: type WarnFlags = EnumSet WarningFlag
- HIE.Bios.Ghc.Api: data () => SuccessFlag
+ HIE.Bios.Ghc.Api: data SuccessFlag
- HIE.Bios.Ghc.Gap: data () => FrontendResult
+ HIE.Bios.Ghc.Gap: data FrontendResult
- HIE.Bios.Ghc.Gap: data () => Hsc a
+ HIE.Bios.Ghc.Gap: data Hsc a
- HIE.Bios.Ghc.Gap: data () => PprStyle
+ HIE.Bios.Ghc.Gap: data PprStyle
- HIE.Bios.Ghc.Gap: data () => Session
+ HIE.Bios.Ghc.Gap: data Session
- HIE.Bios.Ghc.Gap: guessTarget :: GhcMonad m => String -> Maybe UnitId -> Maybe Phase -> m Target
+ HIE.Bios.Ghc.Gap: guessTarget :: GhcMonad m => String -> a -> Maybe Phase -> m Target
- HIE.Bios.Ghc.Gap: load' :: GhcMonad m => Maybe ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag
+ HIE.Bios.Ghc.Gap: load' :: GhcMonad m => a -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag
Files
- ChangeLog.md +13/−1
- hie-bios.cabal +5/−5
- src/HIE/Bios/Cradle.hs +37/−16
- src/HIE/Bios/Environment.hs +0/−1
- src/HIE/Bios/Flags.hs +1/−1
- src/HIE/Bios/Ghc/Api.hs +0/−1
- src/HIE/Bios/Ghc/Check.hs +2/−24
- src/HIE/Bios/Ghc/Gap.hs +18/−69
- tests/BiosTests.hs +27/−24
- tests/Utils.hs +3/−1
ChangeLog.md view
@@ -1,13 +1,25 @@ # ChangeLog hie-bios -## 2023-98-22 - 0.13.0+## 2023-11-14 - 0.13.1 +* Add CI support for GHC 9.8.1 [#419](https://github.com/haskell/hie-bios/pull/419)+* 9.8 support [#417](https://github.com/haskell/hie-bios/pull/417)+* Avoid deadlocks in multi-component support [#416](https://github.com/haskell/hie-bios/pull/416)+* Accept directories in 'findCradle' [#415](https://github.com/haskell/hie-bios/pull/415)+* Drop old GHC version support [#414](https://github.com/haskell/hie-bios/pull/414)++## 2023-08-22 - 0.13.0+ * Multi Component cabal support [#409](https://github.com/haskell/hie-bios/pull/409) * Make sure cabal caches can be found [#408](https://github.com/haskell/hie-bios/pull/408) * Rename project-file to cabalProject in hie.yaml [#407](https://github.com/haskell/hie-bios/pull/407) * Update README for new project-file key [#403](https://github.com/haskell/hie-bios/pull/403) * Add more informative log messages for cradle running [#406](https://github.com/haskell/hie-bios/pull/406) * Add cabal.project support for cabal cradles [#357](https://github.com/haskell/hie-bios/pull/357)++## 2023-11-13 - 0.12.1++* 9.8 support [#417](https://github.com/haskell/hie-bios/pull/417) ## 2023-03-13 - 0.12.0
hie-bios.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: hie-bios-Version: 0.13.0+Version: 0.13.1 Author: Matthew Pickering <matthewtpickering@gmail.com> Maintainer: Matthew Pickering <matthewtpickering@gmail.com> License: BSD-3-Clause@@ -139,7 +139,7 @@ tests/projects/stack-with-yaml/stack-with-yaml.cabal tests/projects/stack-with-yaml/src/Lib.hs -tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.6 || ==9.6.2+tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.6 || ==9.6.2 || ==9.8.1 Library Default-Language: Haskell2010@@ -163,7 +163,7 @@ Other-Modules: Paths_hie_bios autogen-modules: Paths_hie_bios Build-Depends:- base >= 4.8 && < 5,+ base >= 4.14 && < 5, aeson >= 1.4.4 && < 2.3, base16-bytestring >= 0.1.1 && < 1.1, bytestring >= 0.10.8 && < 0.13,@@ -176,11 +176,11 @@ time >= 1.8.0 && < 1.13, extra >= 1.6.14 && < 1.8, prettyprinter ^>= 1.6 || ^>= 1.7.0,- ghc >= 8.6.1 && < 9.7,+ ghc >= 8.10.1 && < 9.9, transformers >= 0.5.2 && < 0.7, temporary >= 1.2 && < 1.4, template-haskell,- text >= 1.2.3 && < 2.1,+ text >= 1.2.3 && < 2.2, unix-compat >= 0.5.1 && < 0.8, unordered-containers >= 0.2.9 && < 0.3, yaml >= 0.10.0 && < 0.12,
src/HIE/Bios/Cradle.hs view
@@ -72,15 +72,22 @@ import GHC.ResponseFile (escapeArgs) import Data.Version-import System.IO.Unsafe (unsafeInterleaveIO)+import Data.IORef import Text.ParserCombinators.ReadP (readP_to_S) ---------------------------------------------------------------- --- | Given root\/foo\/bar.hs, return root\/hie.yaml, or wherever the yaml file was found.+-- | Given @root\/foo\/bar.hs@, return @root\/hie.yaml@, or wherever the yaml file was found.+--+-- Note, 'findCradle' used to **not** work for directories and required a Haskell file.+-- This has been fixed since @0.14.0@.+-- However, 'loadCradle' and 'loadImplicitCradle' still require a Haskell+-- source file and won't work properly with a directory parameter. findCradle :: FilePath -> IO (Maybe FilePath) findCradle wfile = do- let wdir = takeDirectory wfile+ wdir <- doesDirectoryExist wfile >>= \case+ True -> pure wfile+ False -> pure (takeDirectory wfile) runMaybeT (yamlConfig wdir) -- | Given root\/hie.yaml load the Cradle.@@ -142,16 +149,30 @@ } data ProgramVersions =- ProgramVersions { cabalVersion :: Maybe Version- , stackVersion :: Maybe Version- , ghcVersion :: Maybe Version+ ProgramVersions { cabalVersion :: CachedIO (Maybe Version)+ , stackVersion :: CachedIO (Maybe Version)+ , ghcVersion :: CachedIO (Maybe Version) } +newtype CachedIO a = CachedIO (IORef (Either (IO a) a))++makeCachedIO :: IO a -> IO (CachedIO a)+makeCachedIO act = CachedIO <$> newIORef (Left act)++runCachedIO :: CachedIO a -> IO a+runCachedIO (CachedIO ref) =+ readIORef ref >>= \case+ Right x -> pure x+ Left act -> do+ x <- act+ writeIORef ref (Right x)+ pure x+ makeVersions :: LogAction IO (WithSeverity Log) -> FilePath -> ([String] -> IO (CradleLoadResult String)) -> IO ProgramVersions makeVersions l wdir ghc = do- cabalVersion <- unsafeInterleaveIO (getCabalVersion l wdir)- stackVersion <- unsafeInterleaveIO (getStackVersion l wdir)- ghcVersion <- unsafeInterleaveIO (getGhcVersion ghc)+ cabalVersion <- makeCachedIO $ getCabalVersion l wdir+ stackVersion <- makeCachedIO $ getStackVersion l wdir+ ghcVersion <- makeCachedIO $ getGhcVersion ghc pure ProgramVersions{..} getCabalVersion :: LogAction IO (WithSeverity Log) -> FilePath -> IO (Maybe Version)@@ -190,8 +211,8 @@ CradleNone (\err -> CradleFail (err { cradleErrorDependencies = cradleErrorDependencies err `union` deps })) (\(ComponentOptions os' dir ds) -> CradleSuccess (ComponentOptions os' dir (ds `union` deps)))- + resolvedCradlesToCradle :: Show a => LogAction IO (WithSeverity Log) -> (b -> CradleAction a) -> FilePath -> [ResolvedCradle b] -> IO (Cradle a) resolvedCradlesToCradle logger buildCustomCradle root cs = mdo let run_ghc_cmd args =@@ -275,7 +296,7 @@ ConcreteOther a -> buildCustomCradle a resolveCradleTree :: FilePath -> CradleConfig a -> [ResolvedCradle a]-resolveCradleTree root (CradleConfig deps tree) = go root deps tree+resolveCradleTree root (CradleConfig confDeps confTree) = go root confDeps confTree where go pfix deps tree = case tree of Cabal t -> [ResolvedCradle pfix deps (ConcreteCabal t)]@@ -422,7 +443,7 @@ canonicalizeResolvedCradles :: FilePath -> [ResolvedCradle a] -> IO [ResolvedCradle a] canonicalizeResolvedCradles cur_dir cs = sortOn (Down . prefix)- <$> mapM (\c -> (\abs -> c {prefix = abs}) <$> makeAbsolute (cur_dir </> prefix c)) cs+ <$> mapM (\c -> (\abs_fp -> c {prefix = abs_fp}) <$> makeAbsolute (cur_dir </> prefix c)) cs selectCradle :: (a -> FilePath) -> FilePath -> [a] -> Maybe a selectCradle _ _ [] = Nothing@@ -442,8 +463,8 @@ return (CradleSuccess (ComponentOptions (args ++ argDynamic) wdir [])) , runGhcCmd = runGhcCmdOnPath l wdir }- + ------------------------------------------------------------------------- @@ -526,8 +547,8 @@ cabalProc <- cabalProcess l projectFile wdir "v2-exec" $ ["ghc", "-v0", "--"] ++ args readProcessWithCwd' l cabalProc "" }- + -- | Execute a cabal process in our custom cache-build directory configured -- with the custom ghc executable. -- The created process has its working directory set to the given working directory.@@ -770,10 +791,10 @@ -> [FilePath] -> CradleLoadResultT IO ComponentOptions cabalAction (ResolvedCradles root cs vs) workDir mc l projectFile fp fps = do+ cabal_version <- liftIO $ runCachedIO $ cabalVersion vs+ ghc_version <- liftIO $ runCachedIO $ ghcVersion vs let cabalCommand = "v2-repl"- cabal_version = cabalVersion vs- ghc_version = ghcVersion vs cabalArgs = case (cabal_version, ghc_version) of (Just cabal, Just ghc) -- Multi-component supported from cabal-install 3.11
src/HIE/Bios/Environment.hs view
@@ -13,7 +13,6 @@ import System.Environment (lookupEnv) import qualified Crypto.Hash.SHA1 as H-import Colog.Core (LogAction, WithSeverity) import qualified Data.ByteString.Char8 as B import Data.ByteString.Base16 import Data.List
src/HIE/Bios/Flags.hs view
@@ -2,7 +2,7 @@ import HIE.Bios.Types -import Colog.Core (LogAction (..), WithSeverity (..), Severity (..), (<&))+import Colog.Core (WithSeverity (..), Severity (..), (<&)) -- | Initialize the 'DynFlags' relating to the compilation of a single -- file or GHC session according to the provided 'Cradle'.
src/HIE/Bios/Ghc/Api.hs view
@@ -23,7 +23,6 @@ import qualified HIE.Bios.Ghc.Gap as Gap import Control.Monad (void) import Control.Monad.IO.Class-import Colog.Core (LogAction (..), WithSeverity (..)) import HIE.Bios.Types import HIE.Bios.Environment import HIE.Bios.Flags
src/HIE/Bios/Ghc/Check.hs view
@@ -7,14 +7,9 @@ , check ) where -import GHC (DynFlags(..), GhcMonad)+import GHC (GhcMonad) import qualified GHC as G -#if __GLASGOW_HASKELL__ >= 900-import qualified GHC.Driver.Session as G-#else-import qualified DynFlags as G-#endif import Control.Exception import Control.Monad.IO.Class@@ -28,8 +23,6 @@ import qualified HIE.Bios.Ghc.Load as Load import HIE.Bios.Environment -import System.IO.Unsafe (unsafePerformIO)-import qualified HIE.Bios.Ghc.Gap as Gap data Log = LoadLog Load.Log@@ -74,23 +67,8 @@ -> [FilePath] -- ^ The target files. -> m (Either String String) check logger fileNames = do- libDir <- G.topDir <$> G.getDynFlags- withLogger (setAllWarningFlags libDir) $ Load.setTargetFiles (cmap (fmap LoadLog) logger) (map dup fileNames)+ withLogger id $ Load.setTargetFiles (cmap (fmap LoadLog) logger) (map dup fileNames) dup :: a -> (a, a) dup x = (x, x)---------------------------------------------------------------------- | Set 'DynFlags' equivalent to "-Wall".-setAllWarningFlags :: FilePath -> DynFlags -> DynFlags-setAllWarningFlags libDir df = df { warningFlags = allWarningFlags libDir }--{-# NOINLINE allWarningFlags #-}-allWarningFlags :: FilePath -> Gap.WarnFlags-allWarningFlags libDir = unsafePerformIO $- G.runGhcT (Just libDir) $ do- df <- G.getSessionDynFlags- (df', _) <- addCmdOpts ["-Wall"] df- return $ G.warningFlags df'
src/HIE/Bios/Ghc/Gap.hs view
@@ -3,8 +3,6 @@ module HIE.Bios.Ghc.Gap ( ghcVersion -- * Warnings, Doc Compat- , WarnFlags- , emptyWarnFlags , makeUserStyle , PprStyle -- * Argument parsing@@ -27,11 +25,6 @@ , HIE.Bios.Ghc.Gap.getLogger -- * AST compat , pattern HIE.Bios.Ghc.Gap.RealSrcSpan- , LExpression- , LBinding- , LPattern- , inTypes- , outType -- * Exceptions , catch , bracket@@ -49,7 +42,6 @@ -- * Platform constants , hostIsDynamic -- * misc- , getModuleName , getTyThing , fixInfo , Tc.FrontendResult(..)@@ -68,7 +60,7 @@ import GHC import qualified GHC as G -#if __GLASGOW_HASKELL__ >= 804 && __GLASGOW_HASKELL__ < 900+#if __GLASGOW_HASKELL__ >= 810 && __GLASGOW_HASKELL__ < 900 import Data.List import System.FilePath @@ -89,25 +81,13 @@ import Util as G import qualified GhcMonad as G -#if __GLASGOW_HASKELL__ >= 808 import qualified DynamicLoading (initializePlugins) import qualified Plugins (plugins) #endif--#if __GLASGOW_HASKELL__ >= 806 && __GLASGOW_HASKELL__ < 810-import HsExtension (GhcTc)-import HsExpr (MatchGroup, MatchGroupTc(..))-#elif __GLASGOW_HASKELL__ >= 804 && __GLASGOW_HASKELL__ < 810-import HsExtension (GhcTc)-import HsExpr (MatchGroup)-#endif-#endif ---------------------------------------------------------------- ---------------------------------------------------------------- #if __GLASGOW_HASKELL__ >= 902-import GHC.Core.Multiplicity (irrelevantMult)-import GHC.Data.EnumSet as E import GHC.Driver.CmdLine as CmdLine import GHC.Driver.Env as G import GHC.Driver.Session as G@@ -158,6 +138,11 @@ import qualified GhcMake as G #endif +#if __GLASGOW_HASKELL__ >= 907+import GHC.Types.Error (mkUnknownDiagnostic, Messages)+import GHC.Driver.Errors.Types (DriverMessage)+#endif+ ghcVersion :: String ghcVersion = VERSION_ghc @@ -169,8 +154,11 @@ homeUnitId_ = homeUnitId #endif -#if __GLASGOW_HASKELL__ >= 904+#if __GLASGOW_HASKELL__ >= 907 load' :: GhcMonad m => Maybe G.ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag+load' mhmi_cache how_much = G.load' mhmi_cache how_much mkUnknownDiagnostic+#elif __GLASGOW_HASKELL__ >= 904+load' :: GhcMonad m => Maybe G.ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag load' = G.load' #else load' :: GhcMonad m => a -> LoadHowMuch -> Maybe G.Messager -> ModuleGraph -> m SuccessFlag@@ -195,15 +183,9 @@ handle = G.ghandle #endif -#if __GLASGOW_HASKELL__ >= 810 catch :: (E.MonadCatch m, E.Exception e) => m a -> (e -> m a) -> m a catch = E.catch-#else-catch :: (G.ExceptionMonad m, E.Exception e) => m a -> (e -> m a) -> m a-catch =- G.gcatch-#endif ---------------------------------------------------------------- @@ -264,20 +246,8 @@ makeUserStyle dflags style = mkUserStyle dflags style AllTheWay #endif -#if __GLASGOW_HASKELL__ >= 804-getModuleName :: (a, b) -> a-getModuleName = fst-#endif- ------------------------------------------------------------------#if __GLASGOW_HASKELL__ >= 804-type WarnFlags = E.EnumSet WarningFlag-emptyWarnFlags :: WarnFlags-emptyWarnFlags = E.empty-#endif--#if __GLASGOW_HASKELL__ >= 804+#if __GLASGOW_HASKELL__ >= 810 getModSummaries :: ModuleGraph -> [ModSummary] getModSummaries = mgModSummaries @@ -293,44 +263,18 @@ mapOverIncludePaths :: (FilePath -> FilePath) -> DynFlags -> DynFlags mapOverIncludePaths f df = df { includePaths =-#if __GLASGOW_HASKELL__ > 804+#if __GLASGOW_HASKELL__ >= 810 G.IncludeSpecs (map f $ G.includePathsQuote (includePaths df)) (map f $ G.includePathsGlobal (includePaths df)) #if MIN_VERSION_GLASGOW_HASKELL(9,0,2,0) (map f $ G.includePathsQuoteImplicit (includePaths df)) #endif-#else- map f (includePaths df) #endif } ---------------------------------------------------------------- -#if __GLASGOW_HASKELL__ >= 806-type LExpression = LHsExpr GhcTc-type LBinding = LHsBind GhcTc-type LPattern = LPat GhcTc--inTypes :: MatchGroup GhcTc LExpression -> [Type]-#if __GLASGOW_HASKELL__ >= 900-inTypes = map irrelevantMult . mg_arg_tys . mg_ext-#else-inTypes = mg_arg_tys . mg_ext-#endif-outType :: MatchGroup GhcTc LExpression -> Type-outType = mg_res_ty . mg_ext-#elif __GLASGOW_HASKELL__ >= 804-type LExpression = LHsExpr GhcTc-type LBinding = LHsBind GhcTc-type LPattern = LPat GhcTc--inTypes :: MatchGroup GhcTc LExpression -> [Type]-inTypes = mg_arg_tys-outType :: MatchGroup GhcTc LExpression -> Type-outType = mg_res_ty-#endif- unsetLogAction :: GhcMonad m => m () unsetLogAction = do #if __GLASGOW_HASKELL__ >= 902@@ -474,7 +418,12 @@ => Logger -> DynFlags -> [G.Located String]- -> m (DynFlags, [G.Located String], [CmdLine.Warn])+ -> m (DynFlags, [G.Located String]+#if __GLASGOW_HASKELL__ >= 907+ , Messages DriverMessage)+#else+ , [CmdLine.Warn])+#endif #if __GLASGOW_HASKELL__ >= 902 parseDynamicFlags = G.parseDynamicFlags #else
tests/BiosTests.hs view
@@ -19,7 +19,7 @@ import Data.List ( sort, isPrefixOf ) import Data.Typeable import System.Directory-import System.FilePath ((</>) )+import System.FilePath ((</>)) import System.Exit (ExitCode(ExitSuccess, ExitFailure)) import Control.Monad.Extra (unlessM) import qualified HIE.Bios.Ghc.Gap as Gap@@ -48,17 +48,7 @@ defaultMainWithIngredients (ignoreToolTests:defaultIngredients) $ testGroup "Bios-tests"- [ testGroup "Find cradle"- [ testCaseSteps "simple-cabal" $- runTestEnvLocal "./simple-cabal" $ do- findCradleForModuleM "B.hs" (Just "hie.yaml")-- -- Checks if we can find a hie.yaml even when the given filepath- -- is unknown. This functionality is required by Haskell IDE Engine.- , testCaseSteps "simple-cabal-unknown-path" $- runTestEnvLocal "./simple-cabal" $ do- findCradleForModuleM "Foo.hs" (Just "hie.yaml")- ]+ [ testGroup "Find cradle" findCradleTests , testGroup "Symlink" symbolicLinkTests , testGroup "Loading tests" [ testGroup "bios" biosTestCases@@ -301,6 +291,26 @@ testDirectoryM isMultiCradle "B.hs" ] +findCradleTests :: [TestTree]+findCradleTests =+ [ cradleFileTest "Simple Existing File" "./simple-cabal" "B.hs" (Just "hie.yaml")+ -- Checks if we can find a hie.yaml even when the given filepath+ -- is unknown. This functionality is required by Haskell IDE Engine.+ , cradleFileTest "Existing File" "cabal-with-ghc" "src/MyLib.hs" (Just "hie.yaml")+ , cradleFileTest "Non-existing file" "cabal-with-ghc" "src/MyLib2.hs" (Just "hie.yaml")+ , cradleFileTest "Non-existing file 2" "cabal-with-ghc" "MyLib2.hs" (Just "hie.yaml")+ , cradleFileTest "Directory 1" "cabal-with-ghc" "src/" (Just "hie.yaml")+ , cradleFileTest "Directory 2" "simple-cabal" "" (Just "hie.yaml")+ -- Unknown directory in a project, ought to work as well.+ , cradleFileTest "Directory 3" "simple-cabal" "src/" (Just "hie.yaml")+ , cradleFileTest "Directory does not exist" "doesnotexist" "A.hs" Nothing+ ]+ where+ cradleFileTest :: String -> FilePath -> FilePath -> Maybe FilePath -> TestTree+ cradleFileTest testName dir fpTarget result = testCaseSteps testName $ do+ runTestEnv dir $ do+ findCradleForModuleM fpTarget result+ -- ------------------------------------------------------------------ -- Unit-test Helper functions -- ------------------------------------------------------------------@@ -341,9 +351,9 @@ stackYamlResolver :: String stackYamlResolver = #if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,6,2,0)))- "nightly-2023-08-22" -- GHC 9.6.2+ "nightly-2023-11-13" -- GHC 9.6.3 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,4,4,0)))- "lts-21.8" -- GHC 9.4.6+ "lts-21.20" -- GHC 9.4.7 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,2,7,0))) "lts-20.26" -- GHC 9.2.8 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,2,1,0)))@@ -352,14 +362,6 @@ "lts-19.33" -- GHC 9.0.2 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,10,7,0))) "lts-18.28" -- GHC 8.10.7-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,10,1,0)))- "lts-18.6" -- GHC 8.10.4-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,1,0)))- "lts-16.31" -- GHC 8.8.4-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,5,0)))- "lts-14.27" -- GHC 8.6.5-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,4,0)))- "lts-13.19" -- GHC 8.6.4 #endif -- ------------------------------------------------------------------@@ -421,12 +423,13 @@ -- ------------------------------------------------------------------ -- Ignore test group if built with GHC 9.2.1 until GHC 9.2.4+-- or GHC 9.8.1 or newer. -- ------------------------------------------------------------------ ignoreOnUnsupportedGhc :: TestTree -> TestTree ignoreOnUnsupportedGhc tt =-#if (defined(MIN_VERSION_GLASGOW_HASKELL) && MIN_VERSION_GLASGOW_HASKELL(9,2,1,0) && !MIN_VERSION_GLASGOW_HASKELL(9,2,4,0))- ignoreTestBecause "Not supported on GHC >= 9.2.1 && < 9.2.4"+#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,2,1,0) && !MIN_VERSION_GLASGOW_HASKELL(9,2,4,0)) || (MIN_VERSION_GLASGOW_HASKELL(9,8,1,0)))+ ignoreTestBecause "Not supported on GHC >= 9.2.1 && < 9.2.4 || >= 9.8.1" #endif tt
tests/Utils.hs view
@@ -427,7 +427,9 @@ withTempCopy :: FilePath -> (FilePath -> IO a) -> IO a withTempCopy srcDir f = withSystemTempDirectory "hie-bios-test" $ \newDir -> do- copyDir srcDir newDir+ exists <- doesDirectoryExist srcDir+ when exists $ do+ copyDir srcDir newDir f newDir copyDir :: FilePath -> FilePath -> IO ()