Skip to content
New issue

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

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

Already on GitHub? # to your account

Some kind of mind-map of the existing types on GHCJS, and how to convert to/from JS? #51

Open
VictorTaelin opened this issue Dec 22, 2015 · 0 comments

Comments

@VictorTaelin
Copy link

I'm trying to convert Haskell's Data.Vector.Unboxed.Vector Word32 to JavaScript's Uint32Array. I'm sure there is probably some short, one-line, perhaps even O(1) way to do it. The problem is finding it. Browsing through GHCJS's source code, I find a ton of different possibly related types:

SomeBuffer, SomeArrayBuffer, I.SomeInt32Array, ByteArray#, Buffer, ByteString, 
JSArray, MutableArrayBuffer, ArrayBuffer, STArrayBuffer, SomeSTTypedArray, 
SomeUint32Array, IOUint32Array, Uint32Array (...)

And that's not even 10% of the thing. I have an impression it is very well organized, and most of those types are probably necessary and I see a very clear relationship between them, JS arrays, and JS TypedArrays. Yet, the whole is still huge and it is not clear enough what each thing is for. Some kind of mind-map (even if in a written form), connecting all those pieces together, would come very hand for me and anyone else trying to understand GHCJS's source code. Is anyone willing to do the dirty job?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants