Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bower install in the example asks a bunch of questions i don't know the answer to #14

Closed
mwotton opened this issue Dec 19, 2016 · 9 comments

Comments

@mwotton
Copy link

mwotton commented Dec 19, 2016

might it be possible to encode a working version in bower.json or something?

@eskimor
Copy link
Owner

eskimor commented Dec 20, 2016

Which compiler are you on? psc-0.10 or still 0.9?

@mwotton
Copy link
Author

mwotton commented Dec 20, 2016 via email

@eskimor
Copy link
Owner

eskimor commented Dec 20, 2016

Please try with current master and purescript-0.9.x. purescript-0.10.x is not yet supported.

@commandodev
Copy link
Contributor

I'm having similar problems. I rolled back to ps version 0.9.2 and tried again. bower install still asked me to manually resolve a lot of version conflicts:

Unable to find a suitable version for purescript-console, please choose one by typing one of the numbers below:
    1) purescript-console#^1.0.0 which resolved to 1.0.0 and is required by purescript-aff#1.1.0, purescript-servant-support#5.0.0, purescript-subscriber#1.1.2
    2) purescript-console#^1.0.0-rc.1 which resolved to 1.0.0 and is required by purescript-psci-support#1.0.0
    3) purescript-console#^2.0.0 which resolved to 2.0.0 and is required by purescript-psci-support#2.0.0

Prefix the choice with ! to persist it to bower.json

? Answer 1

Unable to find a suitable version for purescript-eff, please choose one by typing one of the numbers below:
    1) purescript-eff#^1.0.0 which resolved to 1.0.0 and is required by purescript-console#1.0.0, purescript-eff-functions#1.0.0, purescript-exceptions#1.0.0, purescript-pux#5.0.3, purescript-react#1.3.0, purescript-refs#1.0.0, purescript-st#1.0.0, purescript-var#0.2.0
    2) purescript-eff#~1.0.0 which resolved to 1.0.0 and is required by purescript-websocket-simple#0.4.0
    3) purescript-eff#^2.0.0 which resolved to 2.0.0 and is required by purescript-console#2.0.0

Prefix the choice with ! to persist it to bower.json

? Answer 1

Unable to find a suitable version for purescript-prelude, please choose one by typing one of the numbers below:
    1) purescript-prelude#~1.0.1 which resolved to 1.0.1 and is required by purescript-signal#6.1.0
    2) purescript-prelude#^1.0.0 which resolved to 1.0.1 and is required by purescript-eff#1.0.0
    3) purescript-prelude#^1.0.1 which resolved to 1.1.0 and is required by purescript-form-urlencoded#1.0.0
    4) purescript-prelude#^2.1.0 which resolved to 2.1.0 and is required by purescript-eff#2.0.0

Prefix the choice with ! to persist it to bower.json

? Answer 1

Unable to find a suitable version for purescript-psci-support, please choose one by typing one of the numbers below:
    1) purescript-psci-support#^1.0.0 which resolved to 1.0.0 and is required by central-counter
    2) purescript-psci-support#^2.0.0 which resolved to 2.0.0

Prefix the choice with ! to persist it to bower.json

? Answer 1

and then pulp psci give me the following:

$ pulp psci
Error 1 of 4:

  at C:\workspace\ext\dev\hs\cortex-dash\frontend\bower_components\purescript-newtype\src\Data\Newtype.purs line 26, column 19 - line 26, column 19

    Unable to parse module:
    unexpected |
    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.

Error 2 of 4:

  at C:\workspace\ext\dev\hs\cortex-dash\frontend\bower_components\purescript-functors\src\Data\Functor\Compose.purs line 26, column 1 - line 26, column 1

    Unable to parse module:
    unexpected type wildcard


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

Error 3 of 4:

  at C:\workspace\ext\dev\hs\cortex-dash\frontend\bower_components\purescript-functors\src\Data\Functor\Coproduct.purs line 39, column 1 - line 39, column 1

    Unable to parse module:
    unexpected type wildcard


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

Error 4 of 4:

  at C:\workspace\ext\dev\hs\cortex-dash\frontend\bower_components\purescript-functors\src\Data\Functor\Product.purs line 30, column 1 - line 30, column 1

    Unable to parse module:
    unexpected type wildcard


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

Any pointers?

@eskimor
Copy link
Owner

eskimor commented Jan 3, 2017

Please try again with new master and delete any packages that don't compile (I don't know why they are being installed):

rm -Rf bower_components/purescript-functors
rm -Rf bower_components/purescript-newtype

@commandodev
Copy link
Contributor

Great - that seems to be working! One other problem though: I've ended up with this line

import GHC.Types (Double)

In the generated code. What should I use on the Haskell side instead of Double?

Thanks for the help :-)

@commandodev
Copy link
Contributor

So scanning through the code it looks like I'd need to add something for Number to PSTypes say psNumber and something like intBridge to Primitives and then either extend defaultBridge or make my own version

Is that about right? Anything else I'd need to do?

@eskimor
Copy link
Owner

eskimor commented Jan 4, 2017

That sounds right - jep. purescript-bridge is extensible, you can either define your own bridge based on defaultBridge or (for such a general purpose type better) you can add it to defaultBridge and send me a PR.

@legrostdg
Copy link

for Double: eskimor/purescript-bridge#18

@eskimor eskimor closed this as completed Feb 1, 2017
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

No branches or pull requests

4 participants