Syncom.Parenthesizer
Utilities for creating expression pretty-printers with minimal parentheses.
Parentheses are re-introduced during pretty-printing using the precedence ordering specified in the parser. Operator associativities also need to be considered to avoid adding extraneous parentheses.
module type PARENTHESIZER = sig ... end
Module type for stateful helper printers for parenthesizing applications with user-defined operators.
module Make
(Format_state : Support.Format_state.S)
(Precedence : Support.Ord.ORD) :
PARENTHESIZER
with type state = Format_state.state
and type precedence = Precedence.t