diff --git a/gulpfile.js b/gulpfile.js index 9486437..250e019 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,7 +20,7 @@ gulp.task('compile', function(cb) { var psc = purescript.psc({ // Compiler options src: [paths.purescripts, paths.bowerSrc], - ffi: paths.ffi, + output: "output", module: "Graphics.D3.Examples" }); diff --git a/src/BarChart1.purs b/src/BarChart1.purs index 59d42ae..93c8d52 100644 --- a/src/BarChart1.purs +++ b/src/BarChart1.purs @@ -1,6 +1,6 @@ module Graphics.D3.Examples.BarChart1 where -import Prelude(id,(++),show,return,unit,Unit(),(>>=),bind) +import Prelude(id,(<>),show,unit,Unit(),(>>=),bind) import Graphics.D3.Base import Graphics.D3.Util import Graphics.D3.Selection @@ -41,5 +41,5 @@ main = do .. selectAll "div" .. bindData array .. enter .. append "div" - .. style' "width" (\d -> show (x d) ++ "px") + .. style' "width" (\d -> show (x d) <> "px") .. text' show diff --git a/src/BarChart2.purs b/src/BarChart2.purs index d790b88..b264712 100644 --- a/src/BarChart2.purs +++ b/src/BarChart2.purs @@ -1,6 +1,6 @@ module Graphics.D3.Examples.BarChart2 where -import Prelude(map,(*),(++),show,(>>>),(-),(/),bind,($)) +import Prelude(map,(*),(<>),show,(>>>),(-),(/),bind,($)) import Data.Either import Data.Array (length) import Data.Traversable @@ -85,7 +85,7 @@ main = do bar <- chart ... selectAll "g" .. bindData typedData .. enter .. append "g" - .. attr'' "transform" (\_ i -> "translate(0," ++ show (i * barHeight) ++ ")") + .. attr'' "transform" (\_ i -> "translate(0," <> show (i * barHeight) <> ")") bar ... append "rect" .. attr' "width" (_.value >>> x) diff --git a/src/BarChart3.purs b/src/BarChart3.purs index bd14221..a3fe415 100644 --- a/src/BarChart3.purs +++ b/src/BarChart3.purs @@ -1,6 +1,6 @@ module Graphics.D3.Examples.BarChart3 where -import Prelude(map,(-),(+),(++),show,(<$>),(<<<),bind) +import Prelude(map,(-),(+),(<>),show,(<$>),(<<<),bind) import Data.Either import Data.Array (length) import Data.Traversable @@ -117,7 +117,7 @@ main = do .. attr "width" (width + margin.left + margin.right) .. attr "height" (height + margin.top + margin.bottom) .. append "g" - .. attr "transform" ("translate(" ++ show margin.left ++ "," ++ show margin.top ++ ")") + .. attr "transform" ("translate(" <> show margin.left <> "," <> show margin.top <> ")") tsv "data/lettersAndFrequencies.tsv" \(Right array) -> do typedData <- traverse coerceDatum array @@ -131,7 +131,7 @@ main = do svg ... append "g" .. attr "class" "x axis" - .. attr "transform" ("translate(0," ++ show height ++ ")") + .. attr "transform" ("translate(0," <> show height <> ")") .. renderAxis xAxis svg ... append "g" diff --git a/src/ForceLayout1.purs b/src/ForceLayout1.purs index f088d5e..a26956f 100644 --- a/src/ForceLayout1.purs +++ b/src/ForceLayout1.purs @@ -11,7 +11,7 @@ import Graphics.D3.Request import Graphics.D3.Scale import Graphics.D3.Selection import Graphics.D3.Util -import Prelude(Unit(),bind) +import Prelude(Unit(),bind,negate) -- | This is a PureScript adaptation of the Sticky Force Layout example: -- | http://bl.ocks.org/mbostock/3750558