Skip to content

Bug: type-decl=sparse is ignored in type extensions #2769

@Invizory

Description

@Invizory

Bug Description

If type-decl=sparse option is set, ocamlformat does not break lines between constructors in type extensions.

How to Reproduce

.ocamlformat:

profile = default
version = 0.28.1
type-decl = sparse

example.ml:

type s =
  | A
  | B

type t = ..
type t += C | D
$ ocamlformat example.ml

Actual result:

type s =
  | A
  | B

type t = ..
type t += C | D

Expected result:

type s =
  | A
  | B

type t = ..
type t +=
  | C
  | D

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions