Skip to content

Confusing type error when transforming from OCaml's stdlib Array to RescriptCore.Array #6263

Closed
@ryyppy

Description

@ryyppy

Minimal example:

open RescriptCore

let arr = [1,2,3]

Array.map((a) => a + 1, arr)

Yields the following type error:

[E] Line 5, column 10:
This has type: \"function$"<'a, [#Has_arity1]>
  Somewhere wanted: array<'b>

Playground Link

The playground comes with uncurried set to true.

I assume \"function$"<'a, [#Has_arity1]> is the internal name for an uncurried callback 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