diff --git a/src/Stack/Build/Installed.hs b/src/Stack/Build/Installed.hs index e5e5663b85..ae6f9c1be9 100644 --- a/src/Stack/Build/Installed.hs +++ b/src/Stack/Build/Installed.hs @@ -21,9 +21,7 @@ import Stack.Prelude import Stack.SourceMap ( getPLIVersion, loadVersion ) import Stack.Types.CompilerPaths ( getGhcPkgExe ) import Stack.Types.DumpPackage - ( DumpPackage (..), SublibDump (..), dpParentLibIdent - , sdPackageName - ) + ( DumpPackage (..), SublibDump (..), dpParentLibIdent ) import Stack.Types.EnvConfig ( HasEnvConfig, packageDatabaseDeps, packageDatabaseExtra , packageDatabaseLocal @@ -311,12 +309,12 @@ gatherAndTransformSubLoadHelper lh = onPreviousLoadHelper newVal _oldVal = newVal (key, value) = case lh.lhSublibrary of Nothing -> (rawPackageName, rawValue) - Just sd -> (sd.sdPackageName, updateAsSublib sd <$> rawValue) + Just sd -> (sd.packageName, updateAsSublib sd <$> rawValue) (rawPackageName, rawValue) = lh.lhPair updateAsSublib sd (Library (PackageIdentifier _sublibMungedPackageName version) libInfo) = Library (PackageIdentifier key version) - libInfo {iliSublib = Map.singleton sd.sdLibraryName libInfo.iliId} + libInfo {iliSublib = Map.singleton sd.libraryName libInfo.iliId} updateAsSublib _ v = v diff --git a/src/Stack/Types/DumpPackage.hs b/src/Stack/Types/DumpPackage.hs index 49ff674b22..823d047ae7 100644 --- a/src/Stack/Types/DumpPackage.hs +++ b/src/Stack/Types/DumpPackage.hs @@ -43,9 +43,9 @@ data DumpPackage = DumpPackage -- | ghc-pkg has a notion of sublibraries when using ghc-pkg dump. We can only -- know it's different through the fields it shows. data SublibDump = SublibDump - { sdPackageName :: PackageName + { packageName :: PackageName -- ^ "package-name" field from ghc-pkg - , sdLibraryName :: StackUnqualCompName + , libraryName :: StackUnqualCompName -- ^ "lib-name" field from ghc-pkg } deriving (Eq, Read, Show) @@ -56,4 +56,4 @@ dpParentLibIdent dp = case (dp.sublib, dp.packageIdent) of (Just sublibDump, PackageIdentifier _ v) -> Just $ PackageIdentifier libParentPackageName v where - SublibDump { sdPackageName = libParentPackageName } = sublibDump + SublibDump { packageName = libParentPackageName } = sublibDump