Skip to content

Outcome printer: ambiguous printing of the types of curried functions and uncurried higher-order functions #6322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
glennsl opened this issue Jul 7, 2023 · 0 comments · Fixed by #6323

Comments

@glennsl
Copy link
Contributor

glennsl commented Jul 7, 2023

module M: {
  let f: string => int => float
} = {
  let f = f => f("")->float
}

The above fails to compile with the non-sensical error:

  Signature mismatch:
  ...
  Values do not match:
    let f: string => int => float
  is not included in
    let f: string => int => float

While the following does compile:

module M: {
  let f: string => int => float
} = {
  let f = _s => n => n->float
}

(PS: Adding parens to the first example makes it compile of course, this is just to reproduce the error message. The issue is solely with the printer.)

@glennsl glennsl changed the title Printing: ambiguous printing of the types of curried functions and uncurried higher-order functions Outcome printer: ambiguous printing of the types of curried functions and uncurried higher-order functions Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant