diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2021-02-14 00:49:53 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2021-02-14 00:51:53 +0100 |
commit | 27fcb41165616b1fd78be1f3d7f8d41625ba1bda (patch) | |
tree | 33baa602020c120698e1e640b9e54d28478de8d8 /src/CabalHelper/Runtime/Compat.hs | |
parent | 87cba6ec1c004d2232cebede610b40edb272c4ee (diff) |
Fix Cabal-3.4 renaming Flags to PackageFlags
Diffstat (limited to 'src/CabalHelper/Runtime/Compat.hs')
-rw-r--r-- | src/CabalHelper/Runtime/Compat.hs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/CabalHelper/Runtime/Compat.hs b/src/CabalHelper/Runtime/Compat.hs index c845f47..ec62581 100644 --- a/src/CabalHelper/Runtime/Compat.hs +++ b/src/CabalHelper/Runtime/Compat.hs @@ -25,6 +25,9 @@ module CabalHelper.Runtime.Compat , componentNameFromComponent , componentOutDir , internalPackageDBPath + , PackageFlag + , flagDefault + , flagName , unFlagAssignment ) where @@ -33,7 +36,6 @@ import System.FilePath import Distribution.PackageDescription ( PackageDescription , GenericPackageDescription(..) - , Flag(..) , FlagName , FlagAssignment , Executable(..) @@ -51,6 +53,13 @@ import Distribution.Simple.LocalBuildInfo , LocalBuildInfo(..) ) +#if CH_MIN_VERSION_Cabal(3,4,0) +-- >= 3.4.0 +import Distribution.PackageDescription (PackageFlag(..)) +#else +-- < 3.4.0 +import Distribution.PackageDescription (Flag(..)) +#endif #if CH_MIN_VERSION_Cabal(1,24,0) import Distribution.Package (UnitId) @@ -237,3 +246,8 @@ internalPackageDBPath lbi distPref = #ifdef NOP_UN_FLAG_ASSIGNMENT unFlagAssignment = id #endif + +#if !CH_MIN_VERSION_Cabal(3,4,0) +-- < 3.4.0 +type PackageFlag = Flag +#endif |