ppx_deriving icon indicating copy to clipboard operation
ppx_deriving copied to clipboard

Add flag for `show` plugin to separate fields with a newline

Open XVilka opened this issue 6 years ago • 2 comments

Something like

type qwe = {
    a: int;
    b: string;
} [@@deriving show { with_path = false, with_newline = true }

will show

{
  a = 4;
  b = "something";
}

XVilka avatar Jun 17 '19 09:06 XVilka

I'm wondering if maybe a dynamically scoped flag would be more fitting there, to give caller control over printing. (And for with_path as well.)

whitequark avatar Jun 19 '19 06:06 whitequark

@whitequark could be the option too, agree.

XVilka avatar Jun 19 '19 06:06 XVilka