File tree Expand file tree Collapse file tree 6 files changed +37
-3
lines changed
Cabal/src/Distribution/PackageDescription
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions Expand file tree Collapse file tree 6 files changed +37
-3
lines changed Original file line number Diff line number Diff line change @@ -1193,9 +1193,10 @@ checkFields pkg =
11931193 unknownCompilers = [ name | (OtherCompiler name, _) <- testedWith pkg ]
11941194 unknownLanguages = [ name | bi <- allBuildInfo pkg
11951195 , UnknownLanguage name <- allLanguages bi ]
1196- unknownExtensions = [ name | bi <- allBuildInfo pkg
1197- , UnknownExtension name <- allExtensions bi
1198- , name `notElem` map prettyShow knownLanguages ]
1196+ unknownExtensions = filter (/= " TypeAbstractions" )
1197+ [ name | bi <- allBuildInfo pkg
1198+ , UnknownExtension name <- allExtensions bi
1199+ , name `notElem` map prettyShow knownLanguages ]
11991200 ourDeprecatedExtensions = nub $ catMaybes
12001201 [ find ((== ext) . fst ) deprecatedExtensions
12011202 | bi <- allBuildInfo pkg
Original file line number Diff line number Diff line change 1+ # cabal check
2+ No errors or warnings could be found in the package.
Original file line number Diff line number Diff line change 1+ import Test.Cabal.Prelude
2+
3+ -- Uknown extension, exception for TypeAbstractions, see #9496
4+ main = cabalTest $
5+ cabal " check" []
Original file line number Diff line number Diff line change 1+ cabal-version : 3.0
2+ name : pkg
3+ synopsis : synopsis
4+ description : description
5+ version : 0
6+ category : example
7+ 8+ license : GPL-3.0-or-later
9+
10+ library
11+ exposed-modules : Module
12+ default-language : Haskell2010
13+ default-extensions : TypeAbstractions
Original file line number Diff line number Diff line change 1+ synopsis: Make `check` recognise `TypeAbstractions`
2+ packages: cabal-install
3+ prs: #9503
4+ issues: #9496
5+
6+ description: {
7+
8+ - `cabal check` will not complain about “Unknown extension” when
9+ finding `TypeAbstractions`.
10+
11+ }
Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ syn keyword cabalExtension contained
267267 \ TraditionalRecordSyntax
268268 \ TransformListComp
269269 \ TupleSections
270+ \ TypeAbstractions
270271 \ TypeApplications
271272 \ TypeData
272273 \ TypeFamilies
@@ -405,6 +406,7 @@ syn keyword cabalExtension contained
405406 \ NoTraditionalRecordSyntax
406407 \ NoTransformListComp
407408 \ NoTupleSections
409+ \ NoTypeAbstractions
408410 \ NoTypeApplications
409411 \ NoTypeFamilies
410412 \ NoTypeFamilyDependencies
You can’t perform that action at this time.
0 commit comments