summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-08-09 14:34:34 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2017-08-09 14:34:34 +0000
commitffb8f654d22bd3c2ef5ad497665a0a73938bee88 (patch)
tree19e308911a3fd2d7bcf125203de665d3423ae66c
parent1a9aae88ec8f57393db4992748a7de08c54cfe61 (diff)
downloadhaskell-ffb8f654d22bd3c2ef5ad497665a0a73938bee88.tar.gz
Push varBinder annotations further in
-rw-r--r--compiler/coreSyn/PprCore.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs
index d4ae498018..2b001d98c4 100644
--- a/compiler/coreSyn/PprCore.hs
+++ b/compiler/coreSyn/PprCore.hs
@@ -349,7 +349,7 @@ binders are printed as "_".
-- These instances are sadly orphans
instance OutputableBndr Var where
- pprBndr bs b = addAnn (varBinder b) (pprCoreBinder bs b)
+ pprBndr bs b = pprCoreBinder bs b
pprInfixOcc b = addAnn (varReference b) (pprInfixName (varName b))
pprPrefixOcc b = addAnn (varReference b) (pprPrefixName (varName b))
bndrIsJoin_maybe = isJoinId_maybe
@@ -373,7 +373,7 @@ pprCoreBinder bind_site bndr
pprUntypedBinder :: Var -> SDoc
pprUntypedBinder binder
- | isTyVar binder = text "@" <+> ppr binder -- NB: don't print kind
+ | isTyVar binder = text "@" <+> addAnn (varBinder binder) (ppr binder) -- NB: don't print kind
| otherwise = pprIdBndr binder
pprTypedLamBinder :: BindingSite -> Bool -> Var -> SDoc
@@ -423,12 +423,12 @@ pprTypedLetBinder binder
pprKindedTyVarBndr :: TyVar -> SDoc
-- Print a type variable binder with its kind (but not if *)
pprKindedTyVarBndr tyvar
- = text "@" <+> pprTyVar tyvar
+ = text "@" <+> addAnn (varBinder tyvar) (pprTyVar tyvar)
-- pprIdBndr does *not* print the type
-- When printing any Id binder in debug mode, we print its inline pragma and one-shot-ness
pprIdBndr :: Id -> SDoc
-pprIdBndr id = ppr id <+> pprIdBndrInfo (idInfo id)
+pprIdBndr id = addAnn (varBinder id) (ppr id) <+> pprIdBndrInfo (idInfo id)
pprIdBndrInfo :: IdInfo -> SDoc
pprIdBndrInfo info