From 30eb950d8588f78d5a6ba77233105e0f3ce2da3b Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 28 Apr 1998 09:06:43 +0000 Subject: [PATCH] [project @ 1998-04-28 09:06:43 by sof] pprId: restrict printing of inline pragma info to non-code settings --- ghc/compiler/basicTypes/Id.lhs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index e9694d4..9d3028c 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -637,12 +637,17 @@ pprId :: Outputable ty => GenId ty -> SDoc pprId Id {idUnique = u, idName = n, idInfo = info} = hcat [ppr n, pp_prags] where - pp_prags | opt_PprStyle_All = case inlinePragInfo info of - IMustNotBeINLINEd -> text "{n}" - IWantToBeINLINEd -> text "{i}" - IMustBeINLINEd -> text "{I}" - other -> empty - | otherwise = empty + pp_prags sty + | opt_PprStyle_All && not (codeStyle sty) + = (case inlinePragInfo info of + IMustNotBeINLINEd -> text "{n}" + IWantToBeINLINEd -> text "{i}" + IMustBeINLINEd -> text "{I}" + other -> empty) sty + + | otherwise + = empty sty + \end{code} \begin{code} -- 1.7.10.4