--------------------------------------------------------------------------------
-- conditional print
cond
  :: Pretty a
  => (Doc -> Doc) -> Maybe a -> Doc
cond f = maybe empty (f . ppr)
cond
  :: Pretty a
  => (Doc -> Doc) -> Maybe a -> Doc
cond f = maybe empty (f . ppr)
cond f = maybe empty (f . ppr)