I am converting a D3 visualisation from Javascript to Purescript and i get a syntax error while trying to save a selection within a do block.
This is the code:
enterCountry country = do
sel <- select "g.root"
.. selectAll "g.country"
.. data (\c -> c.name)
.. enter
.. append "g" .. attr "class" "country"
sel .. append "title" .. text (\c -> c.name)
And this is the error:
unexpected LArrow
expecting no indentation or end of input
See https://github.com/purescript/purescript/wiki/Error-Code-ErrorParsingModule for more information, or to contribute content related to this error.
The error is pointing at the line starting with sel <- ...