Skip to content

v1.3.0 compile error when "uncurried": false in Rescript-v11.1.0 #214

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
dsiu opened this issue Apr 20, 2024 · 2 comments
Closed

v1.3.0 compile error when "uncurried": false in Rescript-v11.1.0 #214

dsiu opened this issue Apr 20, 2024 · 2 comments

Comments

@dsiu
Copy link

dsiu commented Apr 20, 2024

Is "uncurried": false even supported for rescript-core?

FAILED: src/Core__Int.cmj

  We've found a bug for you!
  /Users/dsiu/code/playground/rescript-core/src/Core__Int.res:34:13-35

  32let maybeInt = switch radix {
  33 ┆ | Some(radix) => Core__Float.parseInt(x, ~radix)
  34 ┆ | None => Core__Float.parseInt(x)
  35 ┆ }
  36This call is missing an argument of type (?radix: option<int>)
rescript: [2/32] src/Core__List.cmj
FAILED: src/Core__List.cmj

  We've found a bug for you!
  /Users/dsiu/code/playground/rescript-core/src/Core__List.res:582:39

  580reduceReverseUnsafe(l, acc, f)
  581 │   } else {
  582A.reduceReverseU(toArray(l), acc, f)
  583 │   }
  584 │ }

  This function is a curried function where an uncurried function is expected

FAILED: cannot make progress due to previous errors.
>>>> Finish compiling (exit: 1)
@cknitt
Copy link
Member

cknitt commented Apr 20, 2024

No, you are right, 1.3.0 contains changes like in the above parseInt function that require uncurried mode so that you can have optional args without requiring the trailing unit argument.

This should of course be documented, I will create a PR to update the README.

@cknitt
Copy link
Member

cknitt commented Apr 20, 2024

Updated README in #215.

@cknitt cknitt closed this as completed Apr 20, 2024
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

No branches or pull requests

2 participants