Remove bounds check and exception from Data.String.Unsafe foreign code?
Opened this issue · 3 comments
natefaubion commented
I think the bounds check and the exception are largely unnecessary. Presumably one would be using these APIs if they had already performed the requisite checks. If one wanted an exception (rather than undefined behavior), then there is unsafeJust on the safe API.
michaelficarra commented
I don't see Data.Char.Unsafe. Did you mean Data.String.Unsafe?
natefaubion commented
Yes, sorry.
michaelficarra commented
This sounds good. Also, this will allow us to redefine char as export const char = charAt(0);.