Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Print Ppat_constraint #585

Description

@mununki

I'd like to print this AST, the intended output is below.

(* AST *)
Pat.record lid
Pat.constraint_
  (Pat.var lid)
  (Typ.constr ~attrs:optionalAttr
      {
        txt = lid;
        loc = Location.none;
      }
      []) )

(* original code in OCaml as intended*)
name: name [@optional]

But the printer generates the output

name: (name: @optional name)

I think this branch needs to be fixed with additional pattern matching for Ppat_constraint.

| longident, pattern ->
I'm not sure whether it is correct or error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions