adding patch from ghc-ios