Skip to content

Signature mismatch errors use OCaml wording #9066

Closed

Description

@cknitt

Signature mismatch errors still use OCaml wording in several places:

  • Variant constructors are called fields:

    module M: {
      type rec t<_> = Int(int): t<int> | Str(string): t<string>
    } = {
      type rec t<_> = Int(int): t<int> | Str(string): t<int>
    }
    The types for field Str are not equal.
    

    The same holds for "The arities for field A differ", "Fields number 2 have different names" and "The field C is only present in the first declaration" when comparing variants.

  • Functor positions are written in OCaml syntax:

    module type S = {
      type t
    }
    module M: {
      module F: (X: S) => S with type t = X.t
    } = {
      module F = (X: S) => {
        type t = int
      }
    }
    At position module F(X) : <here>
    
  • Names are quoted OCaml-style: The value `b' is required but not provided.

  • Extension constructors are printed with two spaces: type t += Boom(string).

Activity

  1. added theissue type on Oct 27, 2026
  2. added a commit that references this issue on Oct 27, 2026
    1db203e
  3. added a commit that references this issue on Oct 28, 2026
    b7fed40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions