ghcjs / ghcjs-base

base library for GHCJS for JavaScript interaction and marshalling, used by higher level libraries like JSC
MIT License
45 stars 67 forks source link

Export `toCanvas` and `unsafeToCanvas` #50

Closed yihuang closed 8 years ago

bergey commented 8 years ago

@luite What do you think? I'd like to have unsafeToCanvas available until toCanvas is properly implemented. What's toCanvas meant to do? I can take a stab at a proper implementation.

bergey commented 8 years ago

I dug into this a bit more, and it seems we can use coerce to convert to and from Canvas now. @yihuang can you check if coerce is sufficient to your needs?

(It's nice that GHCJS is based on GHC-7.10, and I don't have to worry about 7.6 compatibility =)

bergey commented 8 years ago

I've implemented several programs using coerce. As far as I know, it's sufficient, so I'm closing this one.