Does Array.index need to be a foreign import?
natefaubion opened this issue · 0 comments
natefaubion commented
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.