diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84aee56..79a0f88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: name: ghc ${{ matrix.ghc }} runs-on: ubuntu-latest strategy: + fail-fast: false matrix: cabal: ["3.8"] ghc: @@ -19,7 +20,7 @@ jobs: - "8.10.7" - "9.0.2" - "9.2.4" - - "9.4.2" + - "9.4.8" - "9.6.3" - "9.8.1" - "9.10.1" diff --git a/extensions.cabal b/extensions.cabal index 1a1596b..8528081 100644 --- a/extensions.cabal +++ b/extensions.cabal @@ -94,7 +94,7 @@ library -- this causes problems in practice let's -- revisit this decision and come up with -- another approach. - , Cabal ^>= 3.12 + , Cabal ^>= 3.14 , containers >= 0.6 && < 0.8 , directory ^>= 1.3 , filepath >= 1.4 && < 1.6 diff --git a/src/Extensions/Cabal.hs b/src/Extensions/Cabal.hs index a83d44e..a0d1292 100644 --- a/src/Extensions/Cabal.hs +++ b/src/Extensions/Cabal.hs @@ -117,14 +117,14 @@ extractCabalExtensions GenericPackageDescription{..} = mconcat foreignToExtensions = condTreeToExtensions (const []) foreignLibBuildInfo exeToExtensions :: CondTree var deps Executable -> IO (Map FilePath ParsedExtensions) - exeToExtensions = condTreeToExtensions (\Executable{..} -> [modulePath]) buildInfo + exeToExtensions = condTreeToExtensions (\Executable{..} -> [getSymbolicPath modulePath]) buildInfo testToExtensions :: CondTree var deps TestSuite -> IO (Map FilePath ParsedExtensions) testToExtensions = condTreeToExtensions testMainPath testBuildInfo where testMainPath :: TestSuite -> [FilePath] testMainPath TestSuite{..} = case testInterface of - TestSuiteExeV10 _ path -> [path] + TestSuiteExeV10 _ path -> [getSymbolicPath path] TestSuiteLibV09 _ m -> [toModulePath m] TestSuiteUnsupported _ -> [] @@ -133,7 +133,7 @@ extractCabalExtensions GenericPackageDescription{..} = mconcat where benchMainPath :: Benchmark -> [FilePath] benchMainPath Benchmark{..} = case benchmarkInterface of - BenchmarkExeV10 _ path -> [path] + BenchmarkExeV10 _ path -> [getSymbolicPath path] BenchmarkUnsupported _ -> [] condTreeToExtensions @@ -399,9 +399,6 @@ toGhcExtension = \case Cabal.TypeAbstractions -> Nothing #endif #if __GLASGOW_HASKELL__ >= 910 - -- This branch cannot be satisfied yet but we're including it so - -- we don't forget to enable RequiredTypeArguments when it - -- becomes available. Cabal.RequiredTypeArguments -> Just RequiredTypeArguments Cabal.ExtendedLiterals -> Just ExtendedLiterals Cabal.ListTuplePuns -> Just ListTuplePuns @@ -409,6 +406,18 @@ toGhcExtension = \case Cabal.RequiredTypeArguments -> Nothing Cabal.ExtendedLiterals -> Nothing Cabal.ListTuplePuns -> Nothing +#endif +#if __GLASGOW_HASKELL__ >= 912 + -- This branch cannot be satisfied yet but we're including it so + -- we don't forget to enable RequiredTypeArguments when it + -- becomes available. + Cabal.NamedDefaults -> Just NamedDefaults + Cabal.MultilineStrings -> Just MultilineStrings + Cabal.OrPatterns -> Just OrPatterns +#else + Cabal.NamedDefaults -> Nothing + Cabal.MultilineStrings -> Nothing + Cabal.OrPatterns -> Nothing #endif -- GHC extensions, parsed by both Cabal and GHC, but don't have an Extension constructor Cabal.Safe -> Nothing