From 27fcb41165616b1fd78be1f3d7f8d41625ba1bda Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 14 Feb 2021 00:49:53 +0100 Subject: Fix Cabal-3.4 renaming Flags to PackageFlags --- src/CabalHelper/Runtime/HelperMain.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/CabalHelper/Runtime/HelperMain.hs') diff --git a/src/CabalHelper/Runtime/HelperMain.hs b/src/CabalHelper/Runtime/HelperMain.hs index 12271bb..983223b 100644 --- a/src/CabalHelper/Runtime/HelperMain.hs +++ b/src/CabalHelper/Runtime/HelperMain.hs @@ -33,7 +33,6 @@ import Distribution.Package import Distribution.PackageDescription ( PackageDescription , GenericPackageDescription(..) - , Flag(..) , FlagName , FlagAssignment , Executable(..) @@ -310,7 +309,9 @@ helper_main args = do $ configFlags lbi nonDefaultFlags = [ (flag_name, val) - | MkFlag {flagName=(unFlagName -> flag_name'), flagDefault=def_val} <- flagDefinitons + | flag <- flagDefinitons + , let flag_name' = unFlagName $ flagName flag + , let def_val = flagDefault flag , (unFlagName -> flag_name, val) <- flagAssgnments , flag_name == flag_name' , val /= def_val @@ -376,7 +377,7 @@ componentsInfo lvd@(lbi, v, distdir) pt = do return uiComponents -flagName' :: Distribution.PackageDescription.Flag -> String +flagName' :: PackageFlag -> String flagName' = unFlagName . flagName componentsMap :: LocalBuildInfo -- cgit v1.2.3