Rewrite all ghc grammar