+ unfolding_is_ok
+ = case inline_pragma of
+ IMustBeINLINEd -> True
+ IWantToBeINLINEd -> True
+ IDontWantToBeINLINEd -> False
+ IMustNotBeINLINEd -> False
+ NoPragmaInfo -> case guidance of
+ UnfoldNever -> False -- Too big
+ other -> True
+
+ guidance = calcUnfoldingGuidance opt_InterfaceUnfoldThreshold rhs
+
+ ------------ Specialisations --------------
+ spec_list = specEnvToList (getIdSpecialisation id)
+ spec_pretty = hsep (map pp_spec spec_list)
+ pp_spec (tyvars, tys, rhs) = hsep [ptext SLIT("_P_"),
+ if null tyvars then ptext SLIT("[ ]")
+ else brackets (interppSP tyvars),
+ -- The lexer interprets "[]" as a CONID. Sigh.
+ hsep (map pprParendType tys),
+ ptext SLIT("="),
+ pprIfaceUnfolding rhs
+ ]