Skip to content

start to update the examples for Purescript 0.9.3, closes #11#12

Open
danse wants to merge 1 commit into
pelotom:masterfrom
danse:master
Open

start to update the examples for Purescript 0.9.3, closes #11#12
danse wants to merge 1 commit into
pelotom:masterfrom
danse:master

Conversation

@danse
Copy link
Copy Markdown

@danse danse commented Oct 11, 2016

Hello, this is mostly to discuss the changes with you in order to be faster. I tried to build with Purescript 0.9.3 and i've got a failure, 4 errors and 19 warnings.

The failure was due to the ffi option passed to the compiler, it's not supported anymore. I removed it but i guess that this is not a solution. At the moment i couldn't find any documentation about how to specify the Javascript files to include. Maybe now the compiler is able to find the files automatically?

About the rest, i fixed the easy errors due to the changes in the prelude. I still have a more complex type checker error in the force layout example, which i need to look again with more calm. In the meantime i wanted to reach out in order to get some feedback about the general direction, since i see that the repo hasn't had commits in a while.

Cheers,
Francesco

@pelotom
Copy link
Copy Markdown
Owner

pelotom commented Oct 14, 2016

I wasn't able to reproduce your warning/error counts so I tried shuffling the deck a bit. On top of your branch I upgraded the gulp-purescript npm dependency to "^1.0.0", and got rid of these very old bower dependencies which were causing version conflicts:

    "purescript-console": "^0.1.0",
    "purescript-integers": "^0.2.0"

Then I get these warnings and errors:

Warning 1 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 3, column 1 - line 3, column 25

    Module Control.Monad.Eff has unspecified imports, consider using the explicit form:

      import Control.Monad.Eff (Eff)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 2 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 4, column 1 - line 4, column 19

    Module Data.Either has unspecified imports, consider using the explicit form:

      import Data.Either (Either(..))



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 3 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 5, column 1 - line 5, column 20

    Module Data.Foreign has unspecified imports, consider using the explicit form:

      import Data.Foreign (Foreign)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 4 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 6, column 1 - line 6, column 28

    Module Data.Foreign.EasyFFI has unspecified imports, consider using the explicit form:

      import Data.Foreign.EasyFFI (unsafeForeignFunction)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 5 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 7, column 1 - line 7, column 24

    Module Graphics.D3.Base has unspecified imports, consider using the explicit form:

      import Graphics.D3.Base (D3Eff, D3)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 6 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 8, column 1 - line 8, column 31

    Module Graphics.D3.Layout.Base has unspecified imports, consider using the explicit form:

      import Graphics.D3.Layout.Base (links, nodes, size)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 7 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 9, column 1 - line 9, column 32

    Module Graphics.D3.Layout.Force has unspecified imports, consider using the explicit form:

      import Graphics.D3.Layout.Force (onTick, createDrag, start, onDragStart, drag, linkDistance, charge, forceLayout)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 8 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 10, column 1 - line 10, column 27

    Module Graphics.D3.Request has unspecified imports, consider using the explicit form:

      import Graphics.D3.Request (json)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 9 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 11, column 1 - line 11, column 25

    The import of module Graphics.D3.Scale is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 10 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 12, column 1 - line 12, column 29

    Module Graphics.D3.Selection has unspecified imports, consider using the explicit form:

      import Graphics.D3.Selection (attr', onDoubleClick, attr, append, enter, bindData, selectAll, rootSelect)



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 11 of 12:

  in module Graphics.D3.Examples.ForceLayout1
  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 13, column 1 - line 13, column 24

    Module Graphics.D3.Util has unspecified imports, consider using the explicit form:

      import Graphics.D3.Util ((..), (...))



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitImport for more information,
  or to contribute content related to this warning.

Warning 12 of 12:

  at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 149, column 1 - line 149, column 7

    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.


Error found:
in module Graphics.D3.Examples.ForceLayout1
at /Users/tom/code/purescript-d3-examples/src/ForceLayout1.purs line 91, column 1 - line 138, column 26

  A case expression could not be determined to cover all inputs.
  The following additional cases are required to cover all inputs:


    (Left _)

  Alternatively, add a Partial constraint to the type of the enclosing value.

while checking that expression let
                                 canvasWidth = 960.0
                                 canvasHeight = 500.0
                               in (bind ((...) (...))) (\$6 ->
                                                          case $6 of
                                                            ...
                                                       )
  has type forall eff.
             Eff
               ( d3 :: D3
               | eff
               )
               Unit
while applying a function (bind (#dict Bind t6)) (((bind (...)) ((...) (...))) (linkDistance 40.0))
  of type (t0 -> t1 t2) -> t1 t2
  to argument \$6 ->
                case $6 of
                  force -> (...) (...)
in value declaration main

where t1 is an unknown type
      t2 is an unknown type
      t0 is an unknown type

See https://github.com/purescript/purescript/wiki/Error-Code-NoInstanceFound for more information,
or to contribute content related to this error.



    at ChildProcess.<anonymous> (/Users/tom/code/purescript-d3-examples/node_modules/gulp-purescript/output/GulpPurescript.ChildProcess/foreign.js:24:31)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Can you reproduce that?

@danse
Copy link
Copy Markdown
Author

danse commented Oct 17, 2016

Hey, thanks for taking the time to look into this! Yes, we are on the same page. I get exactly the same warnings and the same error at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants