-- | Pretty-print an expression, wrapping it in parentheses if necessary
partial_parensOpt :: RExp -> Doc
partial_parensOpt e
    = let doc = pPrint e in
      if parenth e then parens doc else doc
partial_parensOpt :: RExp -> Doc
partial_parensOpt e
    = let doc = pPrint e in
      if parenth e then parens doc else doc
partial_parensOpt e
    = let doc = pPrint e in
      if parenth e then parens doc else doc