where
ppr_bndr = pprBndr CaseBind
+
+-- | Pretty print the argument in a function application.
pprArg :: OutputableBndr a => Expr a -> SDoc
-pprArg (Type ty) = ptext (sLit "@") <+> pprParendType ty
+pprArg (Type ty)
+ | opt_SuppressTypeApplications = empty
+ | otherwise = ptext (sLit "@") <+> pprParendType ty
+
pprArg expr = pprParendExpr expr
\end{code}
pprTypedBinder :: Var -> SDoc
-- Print binder with a type or kind signature (not paren'd)
pprTypedBinder binder
- | isTyCoVar binder = pprKindedTyVarBndr binder
- | otherwise = hang (pprIdBndr binder) 2 (dcolon <+> pprType (idType binder))
+ | isTyCoVar binder = pprKindedTyVarBndr binder
+ | opt_SuppressTypeSignatures = empty
+ | otherwise = hang (pprIdBndr binder) 2 (dcolon <+> pprType (idType binder))
pprKindedTyVarBndr :: TyVar -> SDoc
-- Print a type variable binder with its kind (but not if *)
pprIdBndrInfo :: IdInfo -> SDoc
pprIdBndrInfo info
+ | opt_SuppressIdInfo = empty
+ | otherwise
= megaSeqIdInfo info `seq` doc -- The seq is useful for poking on black holes
where
prag_info = inlinePragInfo info
\begin{code}
ppIdInfo :: Id -> IdInfo -> SDoc
ppIdInfo id info
+ | opt_SuppressIdInfo = empty
+ | otherwise
= showAttributes
[ (True, pp_scope <> ppr (idDetails id))
, (has_arity, ptext (sLit "Arity=") <> int arity)