[commit: ghc] type-nats: Fix printing of type operators in declarations. (8bb2730)
Iavor Diatchki
diatchki at galois.com
Sun Mar 25 00:15:53 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : type-nats
http://hackage.haskell.org/trac/ghc/changeset/8bb2730c3df539c3d57ebd85c9890ea3a3591d17
>---------------------------------------------------------------
commit 8bb2730c3df539c3d57ebd85c9890ea3a3591d17
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date: Sat Mar 24 15:14:50 2012 -0700
Fix printing of type operators in declarations.
>---------------------------------------------------------------
compiler/hsSyn/HsDecls.lhs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs
index d323169..0ebb1f6 100644
--- a/compiler/hsSyn/HsDecls.lhs
+++ b/compiler/hsSyn/HsDecls.lhs
@@ -693,9 +693,9 @@ pp_decl_head :: OutputableBndr name
-> Maybe [LHsType name]
-> SDoc
pp_decl_head context thing tyvars Nothing -- no explicit type patterns
- = hsep [pprHsContext context, ppr thing, interppSP tyvars]
+ = hsep [pprHsContext context, pprPrefixOcc (unLoc thing), interppSP tyvars]
pp_decl_head context thing _ (Just typats) -- explicit type patterns
- = hsep [ pprHsContext context, ppr thing
+ = hsep [ pprHsContext context, pprPrefixOcc (unLoc thing)
, hsep (map (pprParendHsType.unLoc) typats)]
pp_condecls :: OutputableBndr name => [LConDecl name] -> SDoc
More information about the Cvs-ghc
mailing list