X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FIdInfo.lhs;h=fb18c810859277ec5e714be478aaa8d738a8a7ef;hb=893a3c0ad6c39caf71ac28af900733513e1f153e;hp=07cc1813492c2616e70e5dcf384f45392c00c4e6;hpb=9ffadf219cbc4f8ec57264786df936a3cee88aec;p=ghc-hetmet.git diff --git a/compiler/basicTypes/IdInfo.lhs b/compiler/basicTypes/IdInfo.lhs index 07cc181..fb18c81 100644 --- a/compiler/basicTypes/IdInfo.lhs +++ b/compiler/basicTypes/IdInfo.lhs @@ -277,7 +277,6 @@ instance Outputable IdDetails where pprIdDetails :: IdDetails -> SDoc pprIdDetails VanillaId = empty -pprIdDetails (RecSelId {}) = ptext (sLit "[RecSel]") pprIdDetails (DataConWorkId _) = ptext (sLit "[DataCon]") pprIdDetails (DataConWrapId _) = ptext (sLit "[DataConWrapper]") pprIdDetails (ClassOpId _) = ptext (sLit "[ClassOp]") @@ -285,11 +284,14 @@ pprIdDetails (PrimOpId _) = ptext (sLit "[PrimOp]") pprIdDetails (FCallId _) = ptext (sLit "[ForeignCall]") pprIdDetails (TickBoxOpId _) = ptext (sLit "[TickBoxOp]") pprIdDetails DFunId = ptext (sLit "[DFunId]") +pprIdDetails (RecSelId { sel_naughty = is_naughty }) + = brackets $ ptext (sLit "RecSel") <> pp_naughty + where + pp_naughty | is_naughty = ptext (sLit "(naughty)") + | otherwise = empty \end{code} - - %************************************************************************ %* * \subsection{The main IdInfo type} @@ -329,7 +331,7 @@ data IdInfo unfoldingInfo :: Unfolding, -- ^ The 'Id's unfolding cafInfo :: CafInfo, -- ^ 'Id' CAF info lbvarInfo :: LBVarInfo, -- ^ Info about a lambda-bound variable, if the 'Id' is one - inlinePragInfo :: InlinePragInfo, -- ^ Any inline pragma atached to the 'Id' + inlinePragInfo :: InlinePragma, -- ^ Any inline pragma atached to the 'Id' occInfo :: OccInfo, -- ^ How the 'Id' occurs in the program newStrictnessInfo :: Maybe StrictSig, -- ^ Id strictness information. Reason for Maybe: @@ -378,7 +380,7 @@ setWorkerInfo :: IdInfo -> WorkerInfo -> IdInfo setWorkerInfo info wk = wk `seq` info { workerInfo = wk } setSpecInfo :: IdInfo -> SpecInfo -> IdInfo setSpecInfo info sp = sp `seq` info { specInfo = sp } -setInlinePragInfo :: IdInfo -> InlinePragInfo -> IdInfo +setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr } setOccInfo :: IdInfo -> OccInfo -> IdInfo setOccInfo info oc = oc `seq` info { occInfo = oc } @@ -434,7 +436,7 @@ vanillaIdInfo workerInfo = NoWorker, unfoldingInfo = noUnfolding, lbvarInfo = NoLBVarInfo, - inlinePragInfo = AlwaysActive, + inlinePragInfo = defaultInlinePragma, occInfo = NoOccInfo, newDemandInfo = Nothing, newStrictnessInfo = Nothing @@ -493,7 +495,7 @@ ppArityInfo n = hsep [ptext (sLit "Arity"), int n] -- -- The default 'InlinePragInfo' is 'AlwaysActive', so the info serves -- entirely as a way to inhibit inlining until we want it -type InlinePragInfo = Activation +type InlinePragInfo = InlinePragma \end{code}