Compatibility with ghc API >= 7.7