File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Cabal-syntax/src/Distribution/Types/GenericPackageDescription Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,24 @@ import Distribution.Version (Version, VersionRange)
4444
4545type DependencyTree a = CondTree ConfVar [Dependency ] a
4646
47+ -- Merging drops commonStanzas!
48+ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49+ --
50+ -- When using an the bidirectional PatternSynonym 'GenericPackageDescription' and its accessors,
51+ -- commonStanzas is filled with mempty.
52+ --
53+ -- When there's no specific reason to use merging pattern accessors, use the internal one!
54+
4755packageDescription :: Lens' GenericPackageDescription PackageDescription
48- packageDescription f s = fmap (\ x -> s{T. packageDescription = x}) (f (T. packageDescription s))
56+ packageDescription f s = fmap (\ x -> s{T. packageDescriptionInternal = x}) (f (T. packageDescriptionInternal s))
4957{-# INLINE packageDescription #-}
5058
5159gpdScannedVersion :: Lens' GenericPackageDescription (Maybe Version )
52- gpdScannedVersion f s = fmap (\ x -> s{T. gpdScannedVersion = x}) (f (T. gpdScannedVersion s))
60+ gpdScannedVersion f s = fmap (\ x -> s{T. gpdScannedVersionInternal = x}) (f (T. gpdScannedVersionInternal s))
5361{-# INLINE gpdScannedVersion #-}
5462
5563genPackageFlags :: Lens' GenericPackageDescription [PackageFlag ]
56- genPackageFlags f s = fmap (\ x -> s{T. genPackageFlags = x}) (f (T. genPackageFlags s))
64+ genPackageFlags f s = fmap (\ x -> s{T. genPackageFlagsInternal = x}) (f (T. genPackageFlagsInternal s))
5765{-# INLINE genPackageFlags #-}
5866
5967gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (DependencyTree (T. WithImports BuildInfo )))
You can’t perform that action at this time.
0 commit comments