From c57044c700cdc4a847b961773bc5a62984d4ed0c Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 6 May 2004 12:24:52 +0000 Subject: [PATCH] [project @ 2004-05-06 12:24:52 by simonpj] Put parens around binders in debug prints --- ghc/compiler/coreSyn/PprCore.lhs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ghc/compiler/coreSyn/PprCore.lhs b/ghc/compiler/coreSyn/PprCore.lhs index 29a822a..f396974 100644 --- a/ghc/compiler/coreSyn/PprCore.lhs +++ b/ghc/compiler/coreSyn/PprCore.lhs @@ -275,7 +275,7 @@ pprCoreBinder LetBind binder pragmas = ppIdInfo binder (idInfo binder) -- Lambda bound type variables are preceded by "@" -pprCoreBinder LambdaBind bndr = pprTypedBinder bndr +pprCoreBinder LambdaBind bndr = parens (pprTypedBinder bndr) -- Case bound things don't get a signature or a herald pprCoreBinder CaseBind bndr = pprUntypedBinder bndr @@ -287,12 +287,6 @@ pprUntypedBinder binder pprTypedBinder binder | isTyVar binder = ptext SLIT("@") <+> pprTyVarBndr binder | otherwise = pprIdBndr binder <+> dcolon <+> pprType (idType binder) - -- The space before the :: is important; it helps the lexer - -- when reading inferfaces. Otherwise it would lex "a::b" as one thing. - -- - -- It's important that the type is parenthesised too, at least when - -- printing interfaces, because we get \ x::(a->b) y::(c->d) -> ... - -- [Jun 2002: interfaces are now binary, so this doesn't matter] pprTyVarBndr :: TyVar -> SDoc pprTyVarBndr tyvar -- 1.7.10.4