syntax icon indicating copy to clipboard operation
syntax copied to clipboard

Issues with outcome printer and arity0

Open cristianoc opened this issue 2 years ago • 1 comments

See

  • https://github.com/rescript-lang/syntax/pull/512
  • https://github.com/rescript-lang/rescript-vscode/pull/440

One case resolved, this case still outstanding:

// hovering on inferred type: (. unit, unit) => int
let arity0c = (. (), ()) => 3

// hovering on inferred type: (. unit) => int
let arity0d = (. ()) => {
  let f = () => 3
  f
}

cristianoc avatar May 31 '22 11:05 cristianoc

The desired type for arity0d is (. unit) => (unit) => int, except this type is currently equivalent to (. unit, unit) => int. So the type with the intended semantics is currently not expressible.

cristianoc avatar May 31 '22 11:05 cristianoc

The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.

stale[bot] avatar May 28 '23 15:05 stale[bot]