ghc-package_pkg_prerm ()
{
local old_extglob=$(shopt -p extglob)
shopt -s extglob
ghc-unregister-pkg "$(ghc-localpkgconf)"
eval $old_extglob
}