Skip to content

More direct encoding of uncurried function and type definitions #5793

Closed
@cristianoc

Description

@cristianoc

Instead of using the @bs attribute in the parser/printer followed by a PPX in the compiler: use the direct encoding.

// type t0 = (.) => int
type t0 = Js.Fn.arity0<int>

// let f0: t0 = (.) => 3
let f0: t0 = {Js.Fn.\"I0": () => 3}

// type t1 = (.int) => int
type t1 = Js.Fn.arity1<int => int>

// let f1: t1 = (.z) => z+1
let f1: t1 = {Js.Fn.\"I1": z => z + 1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions