fix ghc-pkg functions