purescript-d3
purescript-d3 copied to clipboard
Unable to use purescript-d3 on current purescript
When I do the following:
pulp --version
Pulp version 9.0.1 psc version 0.9.1 using /usr/local/bin/pscpulp init # For a new project bower install purescript-d3 --save
I get conflicting dependencies as follows:
Unable to find a suitable version for purescript-eff, please choose one by typing one of the >numbers below:
- purescript-eff#^0.1.0 which resolved to 0.1.2 and is required by purescript-st#0.1.1
- purescript-eff#^1.0.0 which resolved to 1.0.0 and is required by purescript-console#1.0.0
And neither of these options work.
I suspect that using the master branch will work, however bower currently seems to use v0.7.0, which still exhibits this issue.
Update: Yes, using the master build does work, although it builds with 17 warnings, all of which are much the same:
Warning 1 of 17:
in module Graphics.D3.Interpolate at /Users/arahael/dev/tmp/bower_components/purescript-d3/src/Interpolate.purs line 8, column 1 - line 8, column 28
No type declaration was provided for the top-level declaration of ffi. It is good practice to provide type declarations as a form of documentation. The inferred type of ffi was:
forall a. Array String -> String -> a
in value declaration ffi
See https://github.com/purescript/purescript/wiki/Error-Code-MissingTypeDeclaration for more information, or to contribute content related to this warning.
I am too new to purescript, javascript, or d3 in general to fix this myself, however I'm happy to consider writing a patch if someone is willing to critically review it and fix the inevitable mistakes.
The actual fixes seem to involve mainly a simple matter of adding types to all the 17 functions.
This also probably depend the status of #17 however I wouldn't know what the impact of those changes would be here. Some guidance would be appreciated.
Other than the warnings, think this just needs tagged as release, seems to be working fine for me on 0.9.x - @pelotom would you mind tagging? Maybe also worth pushing to pursuit.
Tagged the latest. I'm happy to take a PR which addresses the warnings.
Also published to Pursuit
can this be added to https://github.com/purescript/package-sets
I think they may have broken it again. I was hoping to learn purescript this evening with d3 as the first library I wanted to use, but once I got it loaded as a package set, it failed with:
at .spago/d3/v0.9.0/src/Time.purs:2:1 - 2:2 (line 2, column 1 - line 2, column 2)
Unable to parse module:
Illegal whitespace character U+0009