Skip to content

Commit

Permalink
Cabal: Reexport all of Cabal-syntax
Browse files Browse the repository at this point in the history
To preserve compatibility for downstream users Cabal will reexport all
of Cabal-syntax for the time being. In the future we may deprecate these
reexports.

This requires that we bump the cabal-version of Cabal.cabal to 1.22 and
drops support for GHC < 7.10.

Closes #7974.
  • Loading branch information
bgamari authored and mergify-bot committed Apr 8, 2022
1 parent f90d541 commit 9e353b0
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 2 deletions.
144 changes: 143 additions & 1 deletion Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: >=1.10
cabal-version: >=1.22
name: Cabal
version: 3.7.0.0
copyright: 2003-2021, Cabal Development Team (see AUTHORS file)
Expand Down Expand Up @@ -151,6 +151,148 @@ library
Distribution.Verbosity
Distribution.Verbosity.Internal

-- We reexport all of Cabal-syntax to aid in compatibility for downstream
-- users. In the future we may opt to deprecate some or all of these exports.
-- See haskell/Cabal#7974.
reexported-modules:
Distribution.Backpack,
Distribution.CabalSpecVersion,
Distribution.Compat.Binary,
Distribution.Compat.CharParsing,
Distribution.Compat.DList,
Distribution.Compat.Exception,
Distribution.Compat.Graph,
Distribution.Compat.Lens,
Distribution.Compat.MonadFail,
Distribution.Compat.Newtype,
Distribution.Compat.NonEmptySet,
Distribution.Compat.Parsing,
Distribution.Compat.Prelude,
Distribution.Compat.Semigroup,
Distribution.Compat.Typeable,
Distribution.Compiler,
Distribution.FieldGrammar,
Distribution.FieldGrammar.Class,
Distribution.FieldGrammar.FieldDescrs,
Distribution.FieldGrammar.Newtypes,
Distribution.FieldGrammar.Parsec,
Distribution.FieldGrammar.Pretty,
Distribution.Fields,
Distribution.Fields.ConfVar,
Distribution.Fields.Field,
Distribution.Fields.Lexer,
Distribution.Fields.LexerMonad,
Distribution.Fields.ParseResult,
Distribution.Fields.Parser,
Distribution.Fields.Pretty,
Distribution.InstalledPackageInfo,
Distribution.License,
Distribution.ModuleName,
Distribution.Package,
Distribution.PackageDescription,
Distribution.PackageDescription.Configuration,
Distribution.PackageDescription.FieldGrammar,
Distribution.PackageDescription.Parsec,
Distribution.PackageDescription.PrettyPrint,
Distribution.PackageDescription.Quirks,
Distribution.PackageDescription.Utils,
Distribution.Parsec,
Distribution.Parsec.Error,
Distribution.Parsec.FieldLineStream,
Distribution.Parsec.Position,
Distribution.Parsec.Warning,
Distribution.Pretty,
Distribution.SPDX,
Distribution.SPDX.License,
Distribution.SPDX.LicenseExceptionId,
Distribution.SPDX.LicenseExpression,
Distribution.SPDX.LicenseId,
Distribution.SPDX.LicenseListVersion,
Distribution.SPDX.LicenseReference,
Distribution.System,
Distribution.Text,
Distribution.Types.AbiDependency,
Distribution.Types.AbiHash,
Distribution.Types.Benchmark,
Distribution.Types.Benchmark.Lens,
Distribution.Types.BenchmarkInterface,
Distribution.Types.BenchmarkType,
Distribution.Types.BuildInfo,
Distribution.Types.BuildInfo.Lens,
Distribution.Types.BuildType,
Distribution.Types.Component,
Distribution.Types.ComponentId,
Distribution.Types.ComponentName,
Distribution.Types.ComponentRequestedSpec,
Distribution.Types.CondTree,
Distribution.Types.Condition,
Distribution.Types.ConfVar,
Distribution.Types.Dependency,
Distribution.Types.DependencyMap,
Distribution.Types.ExeDependency,
Distribution.Types.Executable,
Distribution.Types.Executable.Lens,
Distribution.Types.ExecutableScope,
Distribution.Types.ExposedModule,
Distribution.Types.Flag,
Distribution.Types.ForeignLib,
Distribution.Types.ForeignLib.Lens,
Distribution.Types.ForeignLibOption,
Distribution.Types.ForeignLibType,
Distribution.Types.GenericPackageDescription,
Distribution.Types.GenericPackageDescription.Lens,
Distribution.Types.HookedBuildInfo,
Distribution.Types.IncludeRenaming,
Distribution.Types.InstalledPackageInfo,
Distribution.Types.InstalledPackageInfo.Lens,
Distribution.Types.InstalledPackageInfo.FieldGrammar,
Distribution.Types.LegacyExeDependency,
Distribution.Types.Lens,
Distribution.Types.Library,
Distribution.Types.Library.Lens,
Distribution.Types.LibraryName,
Distribution.Types.LibraryVisibility,
Distribution.Types.Mixin,
Distribution.Types.Module,
Distribution.Types.ModuleReexport,
Distribution.Types.ModuleRenaming,
Distribution.Types.MungedPackageId,
Distribution.Types.MungedPackageName,
Distribution.Types.PackageDescription,
Distribution.Types.PackageDescription.Lens,
Distribution.Types.PackageId,
Distribution.Types.PackageId.Lens,
Distribution.Types.PackageName,
Distribution.Types.PackageVersionConstraint,
Distribution.Types.PkgconfigDependency,
Distribution.Types.PkgconfigName,
Distribution.Types.PkgconfigVersion,
Distribution.Types.PkgconfigVersionRange,
Distribution.Types.SetupBuildInfo,
Distribution.Types.SetupBuildInfo.Lens,
Distribution.Types.SourceRepo,
Distribution.Types.SourceRepo.Lens,
Distribution.Types.TestSuite,
Distribution.Types.TestSuite.Lens,
Distribution.Types.TestSuiteInterface,
Distribution.Types.TestType,
Distribution.Types.UnitId,
Distribution.Types.UnqualComponentName,
Distribution.Types.Version,
Distribution.Types.VersionInterval,
Distribution.Types.VersionInterval.Legacy,
Distribution.Types.VersionRange,
Distribution.Types.VersionRange.Internal,
Distribution.Utils.Base62,
Distribution.Utils.Generic,
Distribution.Utils.MD5,
Distribution.Utils.Path,
Distribution.Utils.ShortText,
Distribution.Utils.String,
Distribution.Utils.Structured,
Distribution.Version,
Language.Haskell.Extension

-- Parsec parser-related modules
build-depends:
-- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity
Expand Down
5 changes: 4 additions & 1 deletion changelog.d/cabal-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ prs: #7620
issues: #7559

description {
- Extract `Cabal-syntax` from `Cabal` to provide the syntax and parsing code for `.cabal` files
- Extract `Cabal-syntax` from `Cabal` to provide the syntax and parsing code
for `.cabal` files. `Cabal` currently reexports all of the modules which were
moved to `Cabal-syntax` although these exports may be deprecated in the
future.
}

0 comments on commit 9e353b0

Please sign in to comment.