pelotom / purescript-d3

PureScript bindings for D3
MIT License
87 stars 19 forks source link

Taking a crack at swapping out easy-ffi for eff-functions #17

Open afcondon opened 8 years ago

afcondon commented 8 years ago

Hi, just FYI i'm working on replacing all the easy-ffi calls with calls using purescript-eff-functions eff-functions instead.

If it works out, and if you want to, i'll be happy to make a PR available when it's done.

pelotom commented 8 years ago

Can you help me understand what the advantage is?

afcondon commented 8 years ago

I can't say as yet whether there definitively is an advantage but the advantages that i foresaw were:

Additionally i have a particular use-case where i wish to use another purescript library purescript-pux from the callbacks associated with elements in the D3 SVG or HTML structure.

Where i'm at now with this is that i have everything working that i wanted to get working. I'm now trying to see how much else i might have to implement in order to really be able to write only in purescript for the D3. My plan would be to add features as i need them (i know i will need zoom, for example). For example, i have added classed and i'm about to add datum.

I think the D3 DSL you created is a really great example of the expressiveness of Haskell / Purescript even for very much non-pure API's such as D3. I'm interested in pushing that as far as it goes.

pelotom commented 8 years ago

Cool, would be happy to entertain a pull request, and it'd be great to see some examples of how the change enables your use case. Growing the library as we want to make use of various parts of D3 is exactly my philosophy for this project. Glad you're finding it useful!