Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format.pp_update_geometry: formatter -> (geometry -> geometry) -> unit #9237

Merged
merged 3 commits into from Jan 15, 2020

Commits on Jan 14, 2020

  1. Configuration menu
    Copy the full SHA
    87b027d View commit details
    Browse the repository at this point in the history
  2. Format.pp_update_geometry: formatter -> (geometry -> geometry) -> unit

    This lets users write code that is robust to the addition of new
    geometry fields.
    
        Format.(pp_update_geometry ppf (fun geo -> {geo with ...}))
    
    Today the only way to set the geometry is
    
        Format.pp_set_geometry ppf ~margin ~max_indent
    
    we cannot add optional parameters after the [ppf] argument, and adding
    new labeled parameters would break user code.
    
    (Also: it's often convenient to work with the record directly, for
    example to reset a previous geometry saved with [pp_get_geometry];
    this is indirectly provided by [pp_update_geometry].)
    gasche committed Jan 14, 2020
    Configuration menu
    Copy the full SHA
    c41b282 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bc574f5 View commit details
    Browse the repository at this point in the history