Skip to content

Does Array.index need to be a foreign import? #241

Open
@natefaubion

Description

@natefaubion

The logic of Array.index can be implemented in terms of length and unsafeIndexImpl. Is it necessary for it to be foreign? In backend-optimizer, I'm preparing a change to inline the bounds check so that the Just allocation can be eliminated in some cases. If index bounds checking was implemented in PureScript rather than FFI, this would just work.

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