summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-01-29 22:35:41 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2017-02-10 12:42:44 +0200
commit258c719599f78178c75b58d9c49e10e498cb7c48 (patch)
tree6bb40e24d6c2886999587c6d83bdaab03d596510 /ghc
parenta5a6c527bed408d8ed43b83a1e9cd69693553779 (diff)
downloadhaskell-258c719599f78178c75b58d9c49e10e498cb7c48.tar.gz
TH-spliced class instances are pretty-printed incorrectly post-#3384
Summary: The HsSyn prettyprinter tests patch 499e43824bda967546ebf95ee33ec1f84a114a7c broke the pretty-printing of Template Haskell-spliced class instances. Test Plan: ./validate Reviewers: RyanGlScott, austin, goldfire, bgamari Reviewed By: RyanGlScott, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3043
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GHCi/UI.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 11c086c45f..97f47397fe 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -1501,7 +1501,8 @@ defineMacro overwrite s = do
-- > ghciStepIO . definition :: String -> IO String
let stringTy = nlHsTyVar stringTy_RDR
ioM = nlHsTyVar (getRdrName ioTyConName) `nlHsAppTy` stringTy
- body = nlHsVar compose_RDR `mkHsApp` step `mkHsApp` expr
+ body = nlHsVar compose_RDR `mkHsApp` (nlHsPar step)
+ `mkHsApp` (nlHsPar expr)
tySig = mkLHsSigWcType (stringTy `nlHsFunTy` ioM)
new_expr = L (getLoc expr) $ ExprWithTySig body tySig
hv <- GHC.compileParsedExprRemote new_expr