Uncaught Unsupported PrimOp: newByteArray# when calling fromRational #32

Closed
RudolfVonKrugstein opened this Issue Nov 6, 2012 · 3 comments

Projects

None yet

2 participants

@RudolfVonKrugstein
Contributor

With this test program:

import Haste

main = alert $ show $ fromRational 1.0

I get:

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?

@valderman
Owner

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.

@RudolfVonKrugstein
Contributor

I implemented this and again encounter

uncaught ReferenceError: __word_encodeDouble is not defined
@valderman
Owner

Fixed in 2e955de.

@valderman valderman closed this Nov 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment