+ unfold_herald = case inline_pragma of
+ NoInlinePragInfo -> ptext SLIT("__u")
+ other -> ppr inline_pragma
+
+ rhs_is_small = case calcUnfoldingGuidance opt_InterfaceUnfoldThreshold rhs of
+ UnfoldNever -> False -- Too big
+ other -> definitely_ok_to_unfold -- Small enough
+
+ definitely_ok_to_unfold = okToUnfoldInHiFile 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
+ ]