[commit: ghc] T8776: ppr_ty_thing: print PatSynCons via IfaceDecl (see #8776 for background) (69b666b)

git at git.haskell.org git at git.haskell.org
Wed Mar 12 12:40:28 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : T8776
Link       : http://ghc.haskell.org/trac/ghc/changeset/69b666be35278e9e847512e33a5bd59e8e6c6c2f/ghc

>---------------------------------------------------------------

commit 69b666be35278e9e847512e33a5bd59e8e6c6c2f
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Wed Mar 12 20:39:42 2014 +0800

    ppr_ty_thing: print PatSynCons via IfaceDecl (see #8776 for background)


>---------------------------------------------------------------

69b666be35278e9e847512e33a5bd59e8e6c6c2f
 compiler/main/PprTyThing.hs |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs
index 27e7390..53c24fc 100644
--- a/compiler/main/PprTyThing.hs
+++ b/compiler/main/PprTyThing.hs
@@ -37,6 +37,7 @@ import Type( tidyTopType, tidyOpenType, splitForAllTys, funResultTy )
 import Kind( synTyConResKind )
 import TypeRep( pprTvBndrs, pprForAll, suppressKinds )
 import TysPrim( alphaTyVars )
+import MkIface ( tyThingToIfaceDecl )
 import TcType
 import Name
 import VarEnv( emptyTidyEnv )
@@ -110,9 +111,9 @@ pprTyThingHdr (ACoAxiom ax)      = pprCoAxiom ax
 ------------------------
 ppr_ty_thing :: ShowSub -> TyThing -> SDoc
 ppr_ty_thing _  (AnId id)          = pprId         id
-ppr_ty_thing _  (AConLike conLike) = case conLike of
+ppr_ty_thing _  tyThing@(AConLike conLike) = case conLike of
     RealDataCon dataCon -> pprDataConSig dataCon
-    PatSynCon patSyn    -> pprPatSyn     patSyn
+    PatSynCon _patSyn    -> ppr $ tyThingToIfaceDecl tyThing
 ppr_ty_thing ss (ATyCon tyCon)     = pprTyCon      ss tyCon
 ppr_ty_thing _  (ACoAxiom ax)      = pprCoAxiom    ax
 



More information about the ghc-commits mailing list