Unverified Commit a572a1fb authored by Oleg Grenrus's avatar Oleg Grenrus Committed by GitHub
Browse files

Merge pull request #4930 from phadej/foreign-lib-names-not-parsed-by-readp

Foreign lib names not parsed by readp
parents 185dccdd 280f1aac
......@@ -147,7 +147,7 @@ ppCondSubLibraries libs = vcat
ppCondForeignLibs :: [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -> Doc
ppCondForeignLibs flibs = vcat
[ emptyLine $ (text "library" <+> disp n) $+$
[ emptyLine $ (text "foreign-library" <+> disp n) $+$
nest indentWith (ppCondTree2 (foreignLibFieldGrammar n) condTree)
| (n, condTree) <- flibs
]
......
......@@ -35,6 +35,7 @@ import qualified Distribution.ParseUtils as ReadP
import Distribution.Compat.Lens
import qualified Distribution.Types.BuildInfo.Lens as L
import qualified Distribution.Types.Executable.Lens as L
import qualified Distribution.Types.ForeignLib.Lens as L
import qualified Distribution.Types.GenericPackageDescription.Lens as L
import qualified Distribution.Types.Library.Lens as L
import qualified Distribution.Types.PackageDescription.Lens as L
......@@ -123,9 +124,10 @@ compareTest pfx fpath bsl
& L.packageDescription . L.description .~ ""
& L.packageDescription . L.synopsis .~ ""
& L.packageDescription . L.maintainer .~ ""
-- ReadP doesn't (always) parse sublibrary or executable names
-- ReadP doesn't (always) parse sublibrary or executable or other component names
& L.condSubLibraries . traverse . _2 . traverse . L.libName .~ Nothing
& L.condExecutables . traverse . _2 . traverse . L.exeName .~ fromString ""
& L.condForeignLibs . traverse . _2 . traverse . L.foreignLibName .~ fromString ""
-- custom fields: no order. TODO: see if we can preserve it.
& L.buildInfos . L.customFieldsBI %~ sort
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment