Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Unsupported PrimOp: newByteArray# when calling fromRational #32

Closed
RudolfVonKrugstein opened this issue Nov 6, 2012 · 3 comments · Fixed by #37
Closed

Uncaught Unsupported PrimOp: newByteArray# when calling fromRational #32

RudolfVonKrugstein opened this issue Nov 6, 2012 · 3 comments · Fixed by #37

Comments

@RudolfVonKrugstein
Copy link
Contributor

@RudolfVonKrugstein RudolfVonKrugstein commented Nov 6, 2012

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

This comment has been minimized.

Copy link
Owner

@valderman valderman commented Nov 6, 2012

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

This comment has been minimized.

Copy link
Contributor Author

@RudolfVonKrugstein RudolfVonKrugstein commented Nov 6, 2012

I implemented this and again encounter

uncaught ReferenceError: __word_encodeDouble is not defined
valderman added a commit that referenced this issue Nov 14, 2012
Implement __word_encodeDouble and byte arrays.

Fixes #31 and #32.
@valderman

This comment has been minimized.

Copy link
Owner

@valderman valderman commented Nov 14, 2012

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
Projects
None yet
2 participants
You can’t perform that action at this time.