ghc-pkg regression (or deliberate change)?

Tyler Pirtle teeler at gmail.com
Tue Feb 22 23:38:22 CET 2011


Hi there,

I'm using a system with an older version of GHC (6.8.3), and invoking
ghc-pkg against a non-existing file in -f:

$ haskell/ghc/v683/k8/lib/ghc-6.8.3/ghc-pkg.bin --global-conf
haskell/ghc/v683/k8/lib/ghc-6.8.3/package.conf -f
/tmp/nonexistent.Foo.package.conf register /tmp/Foo.package_spec

ghc-pkg happily creates the file referenced with -f and fills it with
these contents:


[InstalledPackageInfo {package = PackageIdentifier {pkgName =
"hsS-SFoo", pkgVersion = Version {versionBranch = [1,0], versionTags =
[]}}, license = AllRightsReserved, copyright = "", maintainer = "",
author = "", stability = "", homepage = "", pkgUrl = "", description =
"", category = "", exposed = False, exposedModules = [], hiddenModules
= [], importDirs = [], libraryDirs = [], hsLibraries = [],
extraLibraries = [], extraGHCiLibraries = [], includeDirs = [],
includes = [], depends = [], hugsOptions = [], ccOptions = [],
ldOptions = [], frameworkDirs = [], frameworks = [], haddockInterfaces
= [], haddockHTMLs = []}
]


GHC 7.0.1 it appears does not do the same thing:

$ haskell/ghc/v701/k8/lib/ghc-7.0.1/ghc-pkg --global-conf
haskell/ghc/v701/k8/lib/ghc-7.0.1/package.conf.d -f
/tmp/nonexistent.Foo.package_conf --force register
/tmp/Foo.package_spec
ghc-pkg: .../bin/hs/Foo.package_conf: openFile: does not exist (No
such file or directory)

(paths have been mangled by hand).

ghc-pkg in 6.8.3 does what it does even without using --force. What am
i missing in 7.0.1? Is this a bug or is this intentional?

Thanks,


Tyler



More information about the Glasgow-haskell-users mailing list