With this test program:
main = alert $ show $ fromRational 1.0
Uncaught Unsupported PrimOp: newByteArray# when calling fromRational
Should it not be possible to implement byte arrays the same way as arrays? Or is there an essential difference?
It should definitely be possible; the only difference is that ByteArrays and "normal" arrays use different primops, they work just the same in practice. ByteArrays should probably be implemented as typed arrays though, for better performance.
I implemented this and again encounter
uncaught ReferenceError: __word_encodeDouble is not defined
Fixed in 2e955de.