Skip to content

poly variant duplication in tooltips? #302

Closed
@somebody1234

Description

@somebody1234
module A = {
  type cond<'a> = [< #str(string) | #int(int)] as 'a
  type t<'a> = {
    a: option<int>,
    b: option<cond<'a>>
  }
  let fun = (a, b) => { a: a, b: b }
}

let init: A.t<[#int(int)]> = A.fun(Some(1), Some(#int(1)))

the type of A.fun shows as

(
  option<int>,
  option<
    A.cond<
      [<
        | #str(string) & (string) & (string) & (string)
        | #int(int) & (int) & (int) & (int)
      ],
    >,
  >,
) => A.t<
  [<
    | #str(string) & (string) & (string) & (string)
    | #int(int) & (int) & (int) & (int)
  ],
>

the number of repetitions appears to be proportional to the number of parameters in the function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions