diff options
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnEnv.hs | 8 | ||||
-rw-r--r-- | compiler/rename/RnSplice.hs | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rename/RnEnv.hs b/compiler/rename/RnEnv.hs index c84e7bd328..586548f5d8 100644 --- a/compiler/rename/RnEnv.hs +++ b/compiler/rename/RnEnv.hs @@ -1555,7 +1555,13 @@ dataTcOccs rdr_name = [rdr_name] where occ = rdrNameOcc rdr_name - rdr_name_tc = setRdrNameSpace rdr_name tcName + rdr_name_tc = + case rdr_name of + -- The (~) type operator is always in scope, so we need a special case + -- for it here, or else :info (~) fails in GHCi. + -- See Note [eqTyCon (~) is built-in syntax] + Unqual occ | occNameFS occ == fsLit "~" -> eqTyCon_RDR + _ -> setRdrNameSpace rdr_name tcName {- Note [dataTcOccs and Exact Names] diff --git a/compiler/rename/RnSplice.hs b/compiler/rename/RnSplice.hs index 3e6d64751d..d9cc28ee7b 100644 --- a/compiler/rename/RnSplice.hs +++ b/compiler/rename/RnSplice.hs @@ -753,7 +753,7 @@ traceSplice (SpliceInfo { spliceDescription = sd, spliceSource = mb_src spliceDebugDoc loc = let code = case mb_src of Nothing -> ending - Just e -> nest 2 (ppr e) : ending + Just e -> nest 2 (ppr (stripParensHsExpr e)) : ending ending = [ text "======>", nest 2 gen ] in hang (ppr loc <> colon <+> text "Splicing" <+> text sd) 2 (sep code) |